mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[TGZTest] Fix archive handling, change logs slightly
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -17,3 +17,4 @@
|
|||||||
/SimpleSort/obj
|
/SimpleSort/obj
|
||||||
/SimpleSort/obj/Debug
|
/SimpleSort/obj/Debug
|
||||||
/SimpleSort/obj/Release
|
/SimpleSort/obj/Release
|
||||||
|
/TGZTest/obj
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user