[galaxy-commits] commit/galaxy-central: greg: When uploading compressed files to a data library, remove the compressed file extension only if copying files into Galaxy's file store.
Bitbucket
commits-noreply at bitbucket.org
Fri Jan 20 10:27:02 EST 2012
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/2def96d78d18/
changeset: 2def96d78d18
user: greg
date: 2012-01-20 16:26:54
summary: When uploading compressed files to a data library, remove the compressed file extension only if copying files into Galaxy's file store.
affected #: 1 file
diff -r c08d5e96b5dd8acdc976478cc3cf94b14af501bd -r 2def96d78d188597845d123555c49964b20f821b lib/galaxy/web/controllers/library_common.py
--- a/lib/galaxy/web/controllers/library_common.py
+++ b/lib/galaxy/web/controllers/library_common.py
@@ -1052,14 +1052,17 @@
trans.sa_session.flush()
return output
def make_library_uploaded_dataset( self, trans, cntrller, params, name, path, type, library_bunch, in_folder=None ):
+ link_data_only = params.get( 'link_data_only', 'copy_files' )
library_bunch.replace_dataset = None # not valid for these types of upload
uploaded_dataset = util.bunch.Bunch()
- # Remove compressed file extensions, if any
new_name = name
- if new_name.endswith( '.gz' ):
- new_name = new_name.rstrip( '.gz' )
- elif new_name.endswith( '.zip' ):
- new_name = new_name.rstrip( '.zip' )
+ # Remove compressed file extensions, if any, but only if
+ # we're copying files into Galaxy's file space.
+ if link_data_only == 'copy_files':
+ if new_name.endswith( '.gz' ):
+ new_name = new_name.rstrip( '.gz' )
+ elif new_name.endswith( '.zip' ):
+ new_name = new_name.rstrip( '.zip' )
uploaded_dataset.name = new_name
uploaded_dataset.path = path
uploaded_dataset.type = type
@@ -1070,7 +1073,6 @@
if in_folder:
uploaded_dataset.in_folder = in_folder
uploaded_dataset.data = upload_common.new_upload( trans, cntrller, uploaded_dataset, library_bunch )
- link_data_only = params.get( 'link_data_only', 'copy_files' )
uploaded_dataset.link_data_only = link_data_only
if link_data_only == 'link_to_files':
uploaded_dataset.data.file_name = os.path.abspath( path )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the galaxy-commits
mailing list