diff --git a/SabreTools.Helper/Data/Build.cs b/SabreTools.Helper/Data/Build.cs index 805ca10b..1144efac 100644 --- a/SabreTools.Helper/Data/Build.cs +++ b/SabreTools.Helper/Data/Build.cs @@ -242,7 +242,7 @@ Options: -rar={2} Set scanning level for RAR archives -zip={0} Set scanning level for ZIP archives -SimpleSort scanning levels: +Archive scanning levels: 0 Hash archive and contents 1 Only hash contents 2 Only hash archive @@ -259,10 +259,15 @@ Options: -t=, --temp= Set the temporary directory to use -d, --delete Delete input files -r, --romba Enable Romba depot dir output - -7z={0} Set scanning level for 7z archives + -7z={1} Set scanning level for 7z archives -gz={2} Set scanning level for GZip archives -rar={2} Set scanning level for RAR archives - -zip={0} Set scanning level for ZIP archives"); + -zip={1} Set scanning level for ZIP archives + +Archive scanning levels: + 0 Hash archive and contents + 1 Only hash contents + 2 Only hash archive"); break; default: Console.Write("This is the default help output"); diff --git a/SabreTools.Helper/Tools/ArchiveTools.cs b/SabreTools.Helper/Tools/ArchiveTools.cs index 5e797c4f..68e9a714 100644 --- a/SabreTools.Helper/Tools/ArchiveTools.cs +++ b/SabreTools.Helper/Tools/ArchiveTools.cs @@ -621,7 +621,14 @@ namespace SabreTools.Helper // Rename the input file based on the SHA-1 string tempname = Path.Combine(Path.GetDirectoryName(input), rom.SHA1); - File.Move(input, tempname); + try + { + File.Move(input, tempname); + } + catch (Exception ex) + { + logger.Error(ex.ToString()); + } // If it doesn't exist, create the output file and then write string outfile = Path.Combine(outdir, rom.SHA1 + ".gz"); @@ -632,7 +639,14 @@ namespace SabreTools.Helper } // Name the original input file correctly again - File.Move(tempname, input); + try + { + File.Move(tempname, input); + } + catch (Exception ex) + { + logger.Error(ex.ToString()); + } // Now that it's renamed, inject the header info using (BinaryWriter sw = new BinaryWriter(new MemoryStream())) diff --git a/TGZTest/TGZTest.cs b/TGZTest/TGZTest.cs index a94414eb..34674f5f 100644 --- a/TGZTest/TGZTest.cs +++ b/TGZTest/TGZTest.cs @@ -87,10 +87,10 @@ namespace SabreTools delete = false, romba = false, tgz = true; - int sevenzip = 0, + int sevenzip = 1, gz = 2, rar = 2, - zip = 0; + zip = 1; string outdir = "", tempdir = ""; List inputs = new List();