mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 13:33:09 +00:00
stringutils.py: don't NFC-normalize the output of listdir_unicode.
This commit is contained in:
parent
e2c7ad1d88
commit
9f5488b2d1
@ -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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user