[diffoscope] 01/01: Fall back to current directory instead of empty name

Reiner Herrmann reiner at reiner-h.de
Sat Apr 23 00:58:49 CEST 2016


This is an automated email from the git hooks/post-receive script.

deki-guest pushed a commit to branch master
in repository diffoscope.

commit 57e9e886509a04874af6680677c01d34da79ba55
Author: Reiner Herrmann <reiner at reiner-h.de>
Date:   Sat Apr 23 00:49:27 2016 +0200

    Fall back to current directory instead of empty name
    
    Comparing two Debian packages directly resulted in an
    empty directory name after stripping the filename,
    while it was searching for dbgsym packages.
    os.listdir tried to open it instead of using the
    current directory.
    
    Closes: #820624
---
 diffoscope/comparators/directory.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index bd91eb0..2b4d9db 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -170,7 +170,7 @@ class FilesystemDirectory(object):
 
 class DirectoryContainer(Container):
     def get_member_names(self):
-        return sorted(os.listdir(self.source.path))
+        return sorted(os.listdir(self.source.path or '.'))
 
     def get_member(self, member_name):
         member_path = os.path.join(self.source.path, member_name)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list