[Reproducible-commits] [diffoscope] 08/09: Support passing directories as "foo/" or "foo"

Jérémy Bobbio lunar at moszumanska.debian.org
Thu Aug 20 22:09:41 UTC 2015


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

lunar pushed a commit to branch master
in repository diffoscope.

commit 618cc39a51f37db85d3e1f1d74067ce0aeb752e1
Author: Chris Lamb <lamby at debian.org>
Date:   Thu Aug 20 22:44:31 2015 +0200

    Support passing directories as "foo/" or "foo"
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 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 77c882b..4a88728 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -169,7 +169,7 @@ class DirectoryContainer(Container):
             if root == self._path:
                 root = ''
             else:
-                root = root[len(self._path) + 1:]
+                root = root[len(os.path.commonprefix((root, self._path))):]
             names.extend([os.path.join(root, f) for f in files])
         return names
 

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



More information about the Reproducible-commits mailing list