From 933944c12d2063aa032d53847f629868bd79f9ec Mon Sep 17 00:00:00 2001 From: Nate Coraor Date: Tue, 23 Mar 2010 12:45:08 -0400 Subject: [PATCH] Fix bug in upload where source import files could be removed if an error occurs during detection and galaxy owns the source files. --- tools/data_source/upload.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/data_source/upload.py b/tools/data_source/upload.py index 490ed8fa316..d3a88844ba0 100644 --- a/tools/data_source/upload.py +++ b/tools/data_source/upload.py @@ -24,6 +24,9 @@ def file_err( msg, dataset, json_file ): ext = 'data', dataset_id = dataset.dataset_id, stderr = msg ) ) + "\n" ) + # never remove a server-side upload + if dataset.type in ( 'server_dir', 'path_paste' ): + return try: os.remove( dataset.path ) except: