mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-02 05:46:47 -05:00
Validation fixes
isTempFIle fix, OutFile vs TempFile moving fix
This commit is contained in:
@@ -18,7 +18,7 @@ public class RomFS
|
||||
public RomFS(string fn)
|
||||
{
|
||||
FileName = fn;
|
||||
isTempFile = false;
|
||||
isTempFile = true;
|
||||
using (var fs = File.OpenRead(fn))
|
||||
{
|
||||
fs.Seek(0x8, SeekOrigin.Begin);
|
||||
@@ -223,11 +223,12 @@ internal static void MakeRomFSData(RomfsFile[] RomFiles, MemoryStream metadata,
|
||||
if (OutFileStream != null)
|
||||
OutFileStream.Dispose();
|
||||
}
|
||||
updateTB(TB_Progress, "RomFS Super Block Hash: " + ByteArrayToString(SuperBlockHash));
|
||||
updateTB(TB_Progress, "Saving to destination...");
|
||||
|
||||
if (File.Exists(OutFile)) File.Delete(OutFile);
|
||||
File.Move(TempFile, OutFile);
|
||||
|
||||
if (OutFile != TempFile)
|
||||
{
|
||||
if (File.Exists(OutFile)) File.Delete(OutFile);
|
||||
File.Move(TempFile, OutFile);
|
||||
}
|
||||
}
|
||||
internal static void WriteBinary(string tempFile, string outFile, RichTextBox TB_Progress = null, ProgressBar PB_Show = null)
|
||||
{
|
||||
@@ -801,4 +802,4 @@ public class Output
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user