diff --git a/lib/galaxy/tools/data_fetch.py b/lib/galaxy/tools/data_fetch.py index 21d5365194fb..0f117b55ad5c 100644 --- a/lib/galaxy/tools/data_fetch.py +++ b/lib/galaxy/tools/data_fetch.py @@ -375,8 +375,8 @@ def walk_extra_files(items, prefix=""): assert path datatype.groom_dataset_content(path) - if datatype.file_ext == "directory": - CompressedFile.extract(path, extra_files_path) + if ext == "directory" and not deferred and path: + CompressedFile(path).extract(extra_files_path) staged_extra_files = extra_files_path if len(transform) > 0: