]> err.no Git - dak/commitdiff
Assume that all filenames are iso8859-1 encoded.
authorTorsten Werner <twerner@debian.org>
Tue, 1 Mar 2011 20:41:51 +0000 (21:41 +0100)
committerTorsten Werner <twerner@debian.org>
Tue, 1 Mar 2011 20:41:51 +0000 (21:41 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
daklib/dbconn.py

index bdb223e23cb148429b505da228ecb14a61a52496..aab025136f0b35139f6f1ef590d52b11ea921cb8 100755 (executable)
@@ -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()