diff --git a/lib/galaxy/metadata/set_metadata.py b/lib/galaxy/metadata/set_metadata.py index 221346b8b438..237b106d3c7f 100644 --- a/lib/galaxy/metadata/set_metadata.py +++ b/lib/galaxy/metadata/set_metadata.py @@ -420,11 +420,12 @@ def set_meta(new_dataset_instance, file_dict): ) dataset.dataset.created_from_basename = created_from_basename elif os.path.exists(dataset_path_to_extra_path(external_filename)): - # Only output extra files dir, but no primary output file, that's fine - if dataset.datatype.composite_type == "auto_primary_file": - with open(external_filename, "wb"): - pass - pass + # Only output is extra files dir, but no primary output file, that's fine, + # but make sure we create an empty primary output file. It's a little + # weird to do this, but it does indicate that there's nothing wrong with the file, + # as opposed to perhaps a storage issue. + with open(external_filename, "wb"): + pass else: raise Exception(f"Output file '{external_filename}' not found")