1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/74c4dd43485a/ changeset: r5215:74c4dd43485a user: greg date: 2011-03-11 16:01:54 summary: Apply a corrected version of the patch from Peter Cock that flips the  "Preserve directory structure?" setting when uploading library datasets from filesystem paths. affected #: 3 files (194 bytes) --- a/lib/galaxy/web/controllers/library_common.py Fri Mar 11 09:16:16 2011 -0500 +++ b/lib/galaxy/web/controllers/library_common.py Fri Mar 11 10:01:54 2011 -0500 @@ -1097,9 +1097,7 @@ message = "No paths entered in the upload form" response_code = 400 return None, response_code, message - preserve_dirs = True - if params.get( 'dont_preserve_dirs', False ): - preserve_dirs = False + preserve_dirs = util.string_as_bool( params.get( 'preserve_dirs', False ) ) # locate files bad_paths = [] uploaded_datasets = [] --- a/templates/library/common/common.mako Fri Mar 11 09:16:16 2011 -0500 +++ b/templates/library/common/common.mako Fri Mar 11 10:01:54 2011 -0500 @@ -215,10 +215,11 @@ <div class="form-row"><label>Preserve directory structure?</label><div class="form-row-input"> - <input type="checkbox" name="dont_preserve_dirs" value="No"/>No + <input type="checkbox" name="preserve_dirs" value="Yes" checked="true" />Yes </div><div class="toolParamHelp" style="clear: both;"> - If checked, all files in subdirectories on the filesystem will be placed at the top level of the folder, instead of into subfolders. + If checked (default), library subfolders will be used to preserve any subdirectories on the filesystem.<br /> + If unchecked, any files in subdirectories on the filesystem will be placed directly in the library folder. </div></div> %endif --- a/test/base/twilltestcase.py Fri Mar 11 09:16:16 2011 -0500 +++ b/test/base/twilltestcase.py Fri Mar 11 10:01:54 2011 -0500 @@ -2004,7 +2004,7 @@ # Library dataset stuff def upload_library_dataset( self, cntrller, library_id, folder_id, filename='', server_dir='', replace_id='', upload_option='upload_file', file_type='auto', dbkey='hg18', space_to_tab='', - link_data_only='', dont_preserve_dirs='', roles=[], ldda_message='', hda_ids='', + link_data_only='', preserve_dirs='Yes', roles=[], ldda_message='', hda_ids='', template_refresh_field_name='1_field_name', template_refresh_field_contents='', template_fields=[], show_deleted='False', strings_displayed=[] ): """Add datasets to library using any upload_option""" @@ -2033,8 +2033,8 @@ tc.fv( "1", "space_to_tab", space_to_tab ) if link_data_only: tc.fv( "1", "link_data_only", link_data_only ) - if dont_preserve_dirs: - tc.fv( "1", "dont_preserve_dirs", dont_preserve_dirs ) + if upload_option == 'filesystem_paths' and preserve_dirs == 'Yes': + tc.fv( "1", "preserve_dirs", preserve_dirs ) for role_id in roles: tc.fv( "1", "roles", role_id ) # Refresh the form by selecting the upload_option - we do this here to ensure 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.