From: david-sarah Date: Thu, 17 Jun 2010 01:55:37 +0000 (-0700) Subject: stringutils.py: don't NFC-normalize the output of listdir_unicode. X-Git-Tag: trac-4500~13 X-Git-Url: https://git.rkrishnan.org/junkers?a=commitdiff_plain;h=9f5488b2d1493d14dfec7eb5ac35991ef4401217;p=tahoe-lafs%2Ftahoe-lafs.git stringutils.py: don't NFC-normalize the output of listdir_unicode. --- diff --git a/src/allmydata/util/stringutils.py b/src/allmydata/util/stringutils.py index 890100e0..5d1a6920 100644 --- a/src/allmydata/util/stringutils.py +++ b/src/allmydata/util/stringutils.py @@ -211,15 +211,9 @@ def listdir_unicode(path): # On other platforms (ie. Unix systems), the byte-level API is used if is_unicode_platform: - dirlist = os.listdir(path) + return os.listdir(path) else: - dirlist = listdir_unicode_fallback(path) - - # Normalize the resulting unicode filenames - # - # This prevents different OSes from generating non-equal unicode strings for - # the same filename representation - return [unicodedata.normalize('NFC', fname) for fname in dirlist] + return listdir_unicode_fallback(path) def open_unicode(path, mode): """