[Reproducible-builds] [reproducible/diffoscope.git: PATCH] Support passing directories as "foo/" or "foo"
Chris Lamb
lamby at debian.org
Thu Aug 20 20:44:31 UTC 2015
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 e7a468d..9d526aa 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
--
2.5.0
More information about the Reproducible-builds
mailing list