Don't assume .exe files are Cabinet archives just by extension. trunk

Sun, 13 Jul 2008 17:54:47 -0400

author
Brett Smith <brettcsmith@brettcsmith.org>
date
Sun, 13 Jul 2008 17:54:47 -0400
branch
trunk
changeset 73
a4fff3df2242
parent 72
c4cfaf634bb9
child 74
dd577317bccb

Don't assume .exe files are Cabinet archives just by extension.

.exe files are as likely as not to be archives, so I'd rather not bug the
user for recursive extraction every time they're in an archive. So we'll
detect these sorts of archives by their magic only, which prevents them
from triggering recursive extraction attempts.

scripts/dtrx file | annotate | diff | comparison | revisions
--- a/scripts/dtrx	Sun Jul 13 17:47:57 2008 -0400
+++ b/scripts/dtrx	Sun Jul 13 17:54:47 2008 -0400
@@ -797,7 +797,7 @@
                     ('compress', 'bzip2', 'bz2'),
                     ('compress', 'lzma', 'lzma'),
                     ('7z', None, '7z'),
-                    ('cab', None, 'cab', 'exe'),
+                    ('cab', None, 'cab'),
                     ('shield', None, 'cab', 'hdr')):
         for extension in mapping[2:]:
             extension_map.setdefault(extension, []).append(mapping[:2])

mercurial