mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 05:45:37 +08:00
Fix for when check_binary fails against an actual binary datatype. The logic in upload needs to be revisited per the comments.
This commit is contained in:
@@ -241,7 +241,11 @@ def add_file( dataset, registry, json_file, output_path ):
|
||||
dataset.name = uncompressed_name
|
||||
data_type = 'zip'
|
||||
if not data_type:
|
||||
if check_binary( dataset.path ):
|
||||
# TODO refactor this logic. check_binary isn't guaranteed to be
|
||||
# correct since it only looks at whether the first 100 chars are
|
||||
# printable or not. If someone specifies a known unsniffable
|
||||
# binary datatype and check_binary fails, the file gets mangled.
|
||||
if check_binary( dataset.path ) or Binary.is_ext_unsniffable(dataset.file_type):
|
||||
# We have a binary dataset, but it is not Bam, Sff or Pdf
|
||||
data_type = 'binary'
|
||||
#binary_ok = False
|
||||
|
||||
Reference in New Issue
Block a user