mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ArchiveTools] Make it easier to rebuild to TGZ
This commit is contained in:
@@ -1330,7 +1330,18 @@ namespace SabreTools.Helper.Tools
|
||||
Rom rom = FileTools.GetFileInfo(input, logger);
|
||||
|
||||
// Get the output file name
|
||||
string outfile = Path.Combine(outDir, rom.SHA1 + ".gz");
|
||||
string outfile = null;
|
||||
|
||||
// If we have a romba output, add the romba path
|
||||
if (romba)
|
||||
{
|
||||
outfile = Path.Combine(outDir, Style.GetRombaPath(rom.SHA1));
|
||||
}
|
||||
// Otherwise, we're just rebuilding to the main directory
|
||||
else
|
||||
{
|
||||
outfile = Path.Combine(outDir, rom.SHA1 + ".gz");
|
||||
}
|
||||
|
||||
// If the output file exists, don't try to write again
|
||||
if (!File.Exists(outfile))
|
||||
@@ -1373,12 +1384,6 @@ namespace SabreTools.Helper.Tools
|
||||
inputStream.Dispose();
|
||||
}
|
||||
|
||||
// If we're in romba mode, create the subfolder and move the file
|
||||
if (romba)
|
||||
{
|
||||
FileTools.MoveToRombaFolder(rom, outDir, outfile, logger);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user