Commit 35a2ce90 authored by Chris Lamb's avatar Chris Lamb 💬

comparators.macho: Always strip the filename, not just when by itself.

parent 59dc1818
......@@ -42,13 +42,10 @@ class Otool(Command):
return ['-arch', self._arch]
def filter(self, line):
try:
# Strip the filename itself, it's in the first line on its own,
# terminated by a colon
if line and line.decode('utf-8').strip() == self._path + ':':
return b""
return line
except UnicodeDecodeError:
# Strip filename
prefix = '{}:'.format(self._path)
if line.decode('utf-8', 'ignore').index(prefix) == 0:
return line[len(prefix):].strip()
return line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment