Limit the number of file types to attempt to parse as archive

This commit is contained in:
Matt Nadareski
2016-04-13 12:47:27 -07:00
parent 854649c681
commit 35a6fbe1d6
2 changed files with 13 additions and 1 deletions

View File

@@ -54,6 +54,8 @@ namespace SabreTools
_logger = new Logger(false, "datfromdir.log");
_logger.Start();
Remapping.CreateArchiveFormats();
// First things first, take care of all of the arguments that this could have
_noMD5 = false; _noSHA1 = false; _forceunzip = false; _allfiles = false; _old = false;
_name = ""; _desc = ""; _cat = ""; _version = ""; _author = "";
@@ -289,7 +291,7 @@ namespace SabreTools
DirectoryInfo di = Directory.CreateDirectory(_tempDir);
bool encounteredErrors = true;
if (!_allfiles)
if (!_allfiles && Remapping.ArchiveFormats.Contains(Path.GetExtension(item).ToLowerInvariant()))
{
try
{