[ArchiveTools] Make sure files are moved if in romba mode

This commit is contained in:
Matt Nadareski
2016-10-06 11:06:03 -07:00
parent 19d23d5ebb
commit 1d48490798

View File

@@ -1047,11 +1047,8 @@ namespace SabreTools.Helper
string outfile = Path.Combine(outDir, rom.SHA1 + ".gz"); string outfile = Path.Combine(outDir, rom.SHA1 + ".gz");
// If the output file exists, don't try to write again // If the output file exists, don't try to write again
if (File.Exists(outfile)) if (!File.Exists(outfile))
{ {
return true;
}
// Compress the input stream // Compress the input stream
FileStream inputStream = File.OpenRead(input); FileStream inputStream = File.OpenRead(input);
GZipStream outputStream = new GZipStream(File.Open(outfile, FileMode.Create, FileAccess.Write), CompressionMode.Compress); GZipStream outputStream = new GZipStream(File.Open(outfile, FileMode.Create, FileAccess.Write), CompressionMode.Compress);
@@ -1094,6 +1091,7 @@ namespace SabreTools.Helper
// Dispose of the streams // Dispose of the streams
bw.Dispose(); bw.Dispose();
sw.Dispose(); sw.Dispose();
}
// If we're in romba mode, create the subfolder and move the file // If we're in romba mode, create the subfolder and move the file
if (romba) if (romba)