[Reproducible-commits] [diffoscope] 03/03: Fix path filtering in class files
Reiner Herrmann
reiner at reiner-h.de
Sat Nov 21 18:38:57 UTC 2015
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch master
in repository diffoscope.
commit ebe0618b41ce17710aecce25ca7fad62ad804831
Author: Reiner Herrmann <reiner at reiner-h.de>
Date: Sat Nov 21 19:35:17 2015 +0100
Fix path filtering in class files
When class files are read from archives, the filenames are
passed as bytes, not as string.
This lead to to a wrong regex search in the filter
(^Classfile b'...'$).
---
diffoscope/comparators/java.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/diffoscope/comparators/java.py b/diffoscope/comparators/java.py
index abf9972..f261c88 100644
--- a/diffoscope/comparators/java.py
+++ b/diffoscope/comparators/java.py
@@ -29,7 +29,10 @@ from diffoscope.difference import Difference
class Javap(Command):
def __init__(self, path, *args, **kwargs):
super().__init__(path, *args, **kwargs)
- self.real_path = os.path.realpath(path)
+ if type(path) is bytes:
+ self.real_path = os.path.realpath(path.decode('utf-8'))
+ else:
+ self.real_path = os.path.realpath(path)
@tool_required('javap')
def cmdline(self):
--
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