Tue, 16 Sep 2008 21:51:59 -0400
Make sure all extractors get self.contents defined.
self.contents was set in check_contents, which not every extractor class
needs to call. But every extractor needs to have it, since this is how we
print filenames with -v. So assign this in the extract method, which we're
guaranteed to call.
scripts/dtrx | file | annotate | diff | comparison | revisions |
--- a/scripts/dtrx Sat Jul 26 13:02:53 2008 -0400 +++ b/scripts/dtrx Tue Sep 16 21:51:59 2008 -0400 @@ -212,7 +212,6 @@ self.included_archives.append(os.path.join(path, filename)) def check_contents(self): - self.contents = os.listdir('.') if not self.contents: self.content_type = EMPTY elif len(self.contents) == 1: @@ -269,6 +268,7 @@ try: self.archive.seek(0, 0) self.extract_archive() + self.contents = os.listdir('.') self.check_contents() self.check_success(self.content_type != EMPTY) except EXTRACTION_ERRORS: