Commit 858eaab5 by devttys0

Fixed hexdiff bug introduced by previous patch.

parent 0c62122f
......@@ -328,7 +328,7 @@ class Module(object):
return args
def next_file(self):
def next_file(self, close_previous=True):
'''
Gets the next file to be scanned (including pending extracted files, if applicable).
Also re/initializes self.status.
......@@ -337,6 +337,7 @@ class Module(object):
fp = None
# Ensure files are close to prevent IOError (too many open files)
if close_previous:
try:
self.previous_next_file_fp.close()
except KeyboardInterrupt as e:
......
......@@ -185,7 +185,13 @@ class HexDiff(Module):
self.block = self.DEFAULT_BLOCK_SIZE
# Build a list of files to hexdiff
self.hex_target_files = [x for x in iter(self.next_file, None)]
self.hex_target_files = []
while True:
f = self.next_file(close_previous=False)
if not f:
break
else:
self.hex_target_files.append(f)
# Build the header format string
header_width = (self.block * 4) + 2
......
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