mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 05:45:37 +08:00
Real Job(tm) support for the library upload tool. Does not include iframe upload for the library side yet.
This commit is contained in:
@@ -137,7 +137,7 @@ def add_file( dataset, json_file, output_path ):
|
||||
|
||||
# See if we have an empty file
|
||||
if not os.path.exists( dataset.path ):
|
||||
file_err( 'Uploaded temporary file (%s) does not exist. Please' % dataset.path, dataset, json_file )
|
||||
file_err( 'Uploaded temporary file (%s) does not exist.' % dataset.path, dataset, json_file )
|
||||
return
|
||||
if not os.path.getsize( dataset.path ) > 0:
|
||||
file_err( 'The uploaded file is empty', dataset, json_file )
|
||||
@@ -237,7 +237,10 @@ def add_file( dataset, json_file, output_path ):
|
||||
if ext == 'auto':
|
||||
ext = 'data'
|
||||
# Move the dataset to its "real" path
|
||||
shutil.move( dataset.path, output_path )
|
||||
if dataset.type == 'server_dir':
|
||||
shutil.copy( dataset.path, output_path )
|
||||
else:
|
||||
shutil.move( dataset.path, output_path )
|
||||
# Write the job info
|
||||
info = dict( type = 'dataset',
|
||||
dataset_id = dataset.dataset_id,
|
||||
|
||||
Reference in New Issue
Block a user