Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
tStehling committed Nov 4, 2024
1 parent 27a6a01 commit 7197e5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/galaxy/datatypes/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,7 @@ def sniff_prefix(self, file_prefix: FilePrefix) -> bool:
>>> Vtu().sniff( fname )
False
"""
return self._has_root_element_in_prefix(file_prefix, "VTKFile") and b'type="UnstructuredGrid"' in file_prefix.string_io.read(100)
if not self._has_root_element_in_prefix(file_prefix, "VTKFile"):
return False
header = file_prefix.bytes[:100]
return b'type="UnstructuredGrid"' in header

0 comments on commit 7197e5f

Please sign in to comment.