[TGZTest] Fix archive handling, change logs slightly

This commit is contained in:
Matt Nadareski
2016-08-25 12:44:27 -07:00
parent ce12dd36a7
commit 47dcdf8e02
2 changed files with 6 additions and 3 deletions

3
.gitignore vendored
View File

@@ -16,4 +16,5 @@
/SabreToolsUI/obj/Release /SabreToolsUI/obj/Release
/SimpleSort/obj /SimpleSort/obj
/SimpleSort/obj/Debug /SimpleSort/obj/Debug
/SimpleSort/obj/Release /SimpleSort/obj/Release
/TGZTest/obj

View File

@@ -264,7 +264,7 @@ namespace SabreTools
// Now process all of the inputs // Now process all of the inputs
foreach (string input in _inputs) foreach (string input in _inputs)
{ {
_logger.User("Processing file " + input); _logger.User("Examining file " + input);
// Get if the file should be scanned internally and externally // Get if the file should be scanned internally and externally
bool shouldExternalProcess = true; bool shouldExternalProcess = true;
@@ -298,6 +298,7 @@ namespace SabreTools
// Do an external scan of the file, if necessary // Do an external scan of the file, if necessary
if (shouldExternalProcess) if (shouldExternalProcess)
{ {
_logger.User("Processing file " + input);
ArchiveTools.WriteTorrentGZ(input, _outdir, _romba, _logger); ArchiveTools.WriteTorrentGZ(input, _outdir, _romba, _logger);
} }
@@ -305,7 +306,7 @@ namespace SabreTools
if (shouldInternalProcess) if (shouldInternalProcess)
{ {
// Now, if the file is a supported archive type, also run on all files within // Now, if the file is a supported archive type, also run on all files within
bool encounteredErrors = !ArchiveTools.ExtractArchive(input, _tempdir, _7z, _gz, _rar, _zip, _logger); bool encounteredErrors = ArchiveTools.ExtractArchive(input, _tempdir, _7z, _gz, _rar, _zip, _logger);
// If no errors were encountered, we loop through the temp directory // If no errors were encountered, we loop through the temp directory
if (!encounteredErrors) if (!encounteredErrors)
@@ -313,6 +314,7 @@ namespace SabreTools
_logger.Log("Archive found! Successfully extracted"); _logger.Log("Archive found! Successfully extracted");
foreach (string file in Directory.EnumerateFiles(_tempdir, "*", SearchOption.AllDirectories)) foreach (string file in Directory.EnumerateFiles(_tempdir, "*", SearchOption.AllDirectories))
{ {
_logger.User("Processing extracted file " + file);
ArchiveTools.WriteTorrentGZ(file, _outdir, _romba, _logger); ArchiveTools.WriteTorrentGZ(file, _outdir, _romba, _logger);
} }
} }