Browse Source

Cherry-pick upstream commit FILE5_17-17-gf9d8564 "encode [python] filename". Closes: #435397

Christoph Biedl 10 years ago
parent
commit
6abb544475

+ 17 - 0
debian/patches/cherry-pick.f9d8564.fix-python-8bit-filenames.patch

@@ -0,0 +1,17 @@
+Upstream-Author: Christos Zoulas <christos@zoulas.com>
+Date: Sun Mar 2 14:52:23 2014 +0000
+Upstream-Commit: f9d8564c11f13cb6606c5cba26ec3276cfbcba08
+Description:
+ encode filename (Debian#435397)
+
+--- a/python/magic.py
++++ b/python/magic.py
+@@ -119,7 +119,7 @@
+             bi = bytes(filename, 'utf-8')
+             return str(_file(self._magic_t, bi), 'utf-8')
+         except:
+-            return _file(self._magic_t, filename)
++            return _file(self._magic_t, filename.encode('utf-8'))
+ 
+     def descriptor(self, fd):
+         """

+ 1 - 0
debian/patches/series

@@ -11,3 +11,4 @@
 0012-lxt.patch
 cherry-pick.eced9db.python-over-detection.patch
 cherry-pick.c0c0032.fix-memory-leak.patch
+cherry-pick.f9d8564.fix-python-8bit-filenames.patch