[Reproducible-commits] [diffoscope] 01/01: Perform comparisons of file metadata in directories using original path
Jérémy Bobbio
lunar at moszumanska.debian.org
Fri Aug 21 08:49:13 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 88ca4d0f595b16dc452dd9eecf96ef66a559f1a0
Author: Jérémy Bobbio <lunar at debian.org>
Date: Fri Aug 21 08:45:24 2015 +0000
Perform comparisons of file metadata in directories using original path
We must use the name property and not the path property because the former
is always accurate for files on the filesystem while the latter is only set
after calling get_content()… which would even be wrong for things like symlinks
or devices.
That part of the code doesn't make me happy. Gives a minefield feeling.
I don't have any good idea on how to do better though.
Closes: #796202
---
diffoscope/comparators/directory.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index 4a88728..f7bee42 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -131,7 +131,7 @@ class FilesystemDirectory(object):
differences.append(find_diff)
except RequiredToolNotFound:
logger.info("Unable to find 'getfacl'.")
- differences.extend(compare_meta(self.path, other.path))
+ differences.extend(compare_meta(self.name, other.name))
with DirectoryContainer(self).open() as my_container, \
DirectoryContainer(other).open() as other_container:
my_names = my_container.get_member_names()
@@ -142,7 +142,7 @@ class FilesystemDirectory(object):
with my_file.get_content(), other_file.get_content():
inner_difference = diffoscope.comparators.compare_files(
my_file, other_file, source=name)
- meta_differences = compare_meta(my_file.path, other_file.path)
+ meta_differences = compare_meta(my_file.name, other_file.name)
if meta_differences and not inner_difference:
inner_difference = Difference(None, my_file.path, other_file.path)
if inner_difference:
--
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