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

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

parent 59dc1818
...@@ -42,14 +42,11 @@ class Otool(Command): ...@@ -42,14 +42,11 @@ class Otool(Command):
return ['-arch', self._arch] return ['-arch', self._arch]
def filter(self, line): def filter(self, line):
try: # Strip filename
# Strip the filename itself, it's in the first line on its own, prefix = '{}:'.format(self._path)
# terminated by a colon if line.decode('utf-8', 'ignore').index(prefix) == 0:
if line and line.decode('utf-8').strip() == self._path + ':': return line[len(prefix):].strip()
return b"" return line
return line
except UnicodeDecodeError:
return line
class OtoolHeaders(Otool): class OtoolHeaders(Otool):
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