From 759d4478ec33ec1721d1eb24b1de4e8b5b56dd5d Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Tue, 1 Mar 2011 21:41:51 +0100 Subject: [PATCH] Assume that all filenames are iso8859-1 encoded. Signed-off-by: Torsten Werner --- daklib/dbconn.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daklib/dbconn.py b/daklib/dbconn.py index bdb223e2..aab02513 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() -- 2.39.5