From a07cfa6228b8a404bc79040ff45864e866b2fdc6 Mon Sep 17 00:00:00 2001 From: Dave Bouvier Date: Tue, 25 Jun 2013 10:44:27 -0400 Subject: [PATCH] Fix issue with change_directory action where the target folder would be appended to the full path twice. --- .../galaxy_install/tool_dependencies/fabric_util.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py index bfbf4903441..f5c56b1dfd1 100644 --- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py +++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py @@ -313,9 +313,8 @@ def install_and_build_package( app, tool_dependency, actions_dict ): extract = action_dict.get( 'extract', False ) common_util.url_download( current_dir, filename, url, extract=extract ) elif action_type == 'change_directory': - target_directory = os.path.realpath( os.path.join( current_dir, dir, action_dict[ 'directory' ] ) ) - current_working_dir = os.path.realpath( dir ) - if target_directory.startswith( current_working_dir ) and os.path.exists( target_directory ): + target_directory = os.path.realpath( os.path.join( current_dir, action_dict[ 'directory' ] ) ) + if target_directory.startswith( os.path.realpath( current_dir ) ) and os.path.exists( target_directory ): dir = target_directory else: log.error( 'Invalid or nonexistent directory %s specified, ignoring change_directory action.', target_directory )