1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/a9e1f0c2f239/ changeset: a9e1f0c2f239 user: dannon date: 2012-02-24 19:37:57 summary: FTP Upload - Normalize filesystem and input filename encodings prior to comparison. Umlauts, etc will now behave properly in FTP upload dialog and will no longer default to "No data was entered in the upload form...". affected #: 1 file diff -r 9a5a2a6bbec2b74f888b907aff05ebcfb274aee4 -r a9e1f0c2f2398661152ef221193e944e50cb71a1 lib/galaxy/tools/parameters/grouping.py --- a/lib/galaxy/tools/parameters/grouping.py +++ b/lib/galaxy/tools/parameters/grouping.py @@ -2,18 +2,19 @@ Constructs for grouping tool parameters """ -from basic import ToolParameter -from galaxy.util.expressions import ExpressionContext - import logging log = logging.getLogger( __name__ ) -import StringIO, os, urllib +import os +import StringIO +import unicodedata +from basic import ToolParameter from galaxy.datatypes import sniff +from galaxy.util import inflector +from galaxy.util import relpath +from galaxy.util import sanitize_for_filename from galaxy.util.bunch import Bunch -from galaxy.util.odict import odict -from galaxy.util import json, relpath, sanitize_for_filename -from galaxy.util import inflector +from galaxy.util.expressions import ExpressionContext class Group( object ): def __init__( self ): @@ -306,6 +307,9 @@ # look for files uploaded via FTP valid_files = [] if ftp_files is not None: + # Normalize input paths to ensure utf-8 encoding is normal form c. + # This allows for comparison when the filesystem uses a different encoding than the browser. + ftp_files = [unicodedata.normalize('NFC', f) for f in ftp_files] if trans.user is None: log.warning( 'Anonymous user passed values in ftp_files: %s' % ftp_files ) ftp_files = [] @@ -316,7 +320,8 @@ for filename in filenames: path = relpath( os.path.join( dirpath, filename ), user_ftp_dir ) if not os.path.islink( os.path.join( dirpath, filename ) ): - valid_files.append( path ) + # Normalize filesystem paths + valid_files.append( unicodedata.normalize('NFC', path )) else: ftp_files = [] for ftp_file in ftp_files: 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.