Skip to content

Commit

Permalink
Merge pull request #16705 from mvdbeek/no_extra_files_for_pending
Browse files Browse the repository at this point in the history
[23.1] List extra files only for terminal datasets
  • Loading branch information
bgruening authored Sep 17, 2023
2 parents 3e991f1 + d699486 commit 60b7d65
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/galaxy/webapps/galaxy/services/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,15 +545,16 @@ def extra_files(
Generate list of extra files.
"""
hda = self.hda_manager.get_accessible(history_content_id, trans.user)
extra_files_path = hda.extra_files_path
rval = []
for root, directories, files in safe_walk(extra_files_path):
for directory in directories:
rval.append(
{"class": "Directory", "path": os.path.relpath(os.path.join(root, directory), extra_files_path)}
)
for file in files:
rval.append({"class": "File", "path": os.path.relpath(os.path.join(root, file), extra_files_path)})
if not hda.is_pending and hda.extra_files_path_exists():
extra_files_path = hda.extra_files_path
for root, directories, files in safe_walk(extra_files_path):
for directory in directories:
rval.append(
{"class": "Directory", "path": os.path.relpath(os.path.join(root, directory), extra_files_path)}
)
for file in files:
rval.append({"class": "File", "path": os.path.relpath(os.path.join(root, file), extra_files_path)})

return rval

Expand Down

0 comments on commit 60b7d65

Please sign in to comment.