From: Torsten Werner Date: Tue, 1 Mar 2011 20:41:51 +0000 (+0100) Subject: Assume that all filenames are iso8859-1 encoded. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=759d4478ec33ec1721d1eb24b1de4e8b5b56dd5d;p=dak.git Assume that all filenames are iso8859-1 encoded. Signed-off-by: Torsten Werner --- 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()