[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master 6/8] Assume that all filenames are iso8859-1 encoded.



Signed-off-by: Torsten Werner <twerner@debian.org>
---
 daklib/dbconn.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/daklib/dbconn.py b/daklib/dbconn.py
index bdb223e..aab0251 100755
--- a/daklib/dbconn.py
+++ b/daklib/dbconn.py
@@ -508,7 +508,8 @@ class DBBinary(ORMObject):
     def scan_contents(self):
         '''
         Yields the contents of the package. Only regular files are yielded and
-        the path names are normalized.
+        the path names are normalized after converting them from iso8859-1
+        encoding.
         '''
         fullpath = self.poolfile.fullpath
         debdata = Popen(['dpkg-deb', '--fsys-tarfile', fullpath],
@@ -516,7 +517,7 @@ class DBBinary(ORMObject):
         tar = TarFile.open(fileobj = debdata, mode = 'r|')
         for member in tar.getmembers():
             if member.isfile():
-                yield normpath(member.name)
+                yield normpath(member.name.decode('iso8859-1'))
         tar.close()
         debdata.close()
 
-- 
1.7.2.3



Reply to: