Revision: 1245
Author: g.rodola
Date: Tue Feb 4 22:32:54 2014 UTC
Log: Fix issue 280: (Python 2) unable to complete directory listing
with invalid UTF8 characters. (patch by
d...@devicenull.org)
http://code.google.com/p/pyftpdlib/source/detail?r=1245
Modified:
/trunk/CREDITS
/trunk/HISTORY
/trunk/pyftpdlib/filesystems.py
=======================================
--- /trunk/CREDITS Wed Nov 6 20:25:02 2013 UTC
+++ /trunk/CREDITS Tue Feb 4 22:32:54 2014 UTC
@@ -170,3 +170,6 @@
N: Michael Ross
E:
michael...@gmail.com
D: issue 273
+
+E:
d...@devicenull.org
+D: issue 280
=======================================
--- /trunk/HISTORY Mon Dec 30 11:46:07 2013 UTC
+++ /trunk/HISTORY Tue Feb 4 22:32:54 2014 UTC
@@ -15,6 +15,8 @@
BUG FIXES
* #261: (FTPS) SSL shutdown does not properly work on Windows.
+ * #280: (Python 2) unable to complete directory listing with invalid UTF8
+ characters. (patch by
d...@devicenull.org)
Version: 1.3.0 - Date: 2013-11-07
=======================================
--- /trunk/pyftpdlib/filesystems.py Mon Dec 30 11:46:07 2013 UTC
+++ /trunk/pyftpdlib/filesystems.py Tue Feb 4 22:32:54 2014 UTC
@@ -455,7 +455,7 @@
#
http://bugs.python.org/issue683592
file = os.path.join(bytes(basedir), bytes(basename))
if not isinstance(basename, unicode):
- basename = unicode(basename, 'utf8')
+ basename = unicode(basename, 'utf8', 'ignore')
else:
file = os.path.join(basedir, basename)
try:
@@ -568,7 +568,7 @@
#
http://bugs.python.org/issue683592
file = os.path.join(bytes(basedir), bytes(basename))
if not isinstance(basename, unicode):
- basename = unicode(basename, 'utf8')
+ basename = unicode(basename, 'utf8', 'ignore')
else:
file = os.path.join(basedir, basename)
# in order to properly implement 'unique' fact (RFC-3659,