Skip to content

Commit

Permalink
Fix "File is not accessible error".
Browse files Browse the repository at this point in the history
This error was due to directory being extracted in /tmp, which
is not visible by docker.
  • Loading branch information
jra001k authored and jmchilton committed Mar 4, 2019
1 parent 3928f21 commit b1fe4bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2470,11 +2470,13 @@ def exec_before_job(self, app, inp_data, out_data, param_dict=None):

assert os.path.exists(tar_file_location), tar_file_location

tmp_dir = os.path.join('/tmp', str(uuid.uuid4()))
tmp_dir = os.path.join(local_working_directory, 'direx', str(uuid.uuid4())) # direx for "DIR EXtract"
directory_location = os.path.join(tmp_dir, directory_name)

os.makedirs(tmp_dir)

assert os.path.exists(tmp_dir), tmp_dir

bkp_cwd = os.getcwd(); os.chdir(tmp_dir)
tar = tarfile.open(tar_file_location); tar.extractall(); tar.close()
os.chdir(bkp_cwd)
Expand Down

0 comments on commit b1fe4bf

Please sign in to comment.