X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=9b757d13487887382595daa0cb23b55742301411;hb=4de40902223f28face536ebdfb5f00bec04b9294;hp=87db1a35fa1a0dda87bc5ee2237079854caae879;hpb=3dc0b40477fad44d76168e9b1dd96a9cbbfbf660;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 87db1a35..9b757d13 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -508,14 +508,15 @@ class DBBinary(ORMObject): def scan_contents(self): ''' Yields the contents of the package. Only regular files are yielded and - the path names are normalized after converting them from either utf-8 or - iso8859-1 encoding. + the path names are normalized after converting them from either utf-8 + or iso8859-1 encoding. It yields the string ' ' if the + package does not contain any regular file. ''' fullpath = self.poolfile.fullpath dpkg = Popen(['dpkg-deb', '--fsys-tarfile', fullpath], stdout = PIPE) tar = TarFile.open(fileobj = dpkg.stdout, mode = 'r|') for member in tar.getmembers(): - if member.isfile(): + if not member.isdir(): name = normpath(member.name) # enforce proper utf-8 encoding try: