some more code cleanup and a few minor fixes

This commit is contained in:
hbeham
2019-11-08 19:35:59 +01:00
parent 34b281f5fc
commit 65600756da
28 changed files with 206 additions and 218 deletions

View File

@@ -98,15 +98,14 @@ namespace ChanSort.Loader.Panasonic
if (cypherMode == CypherMode.None)
return this.FileName;
var tempFile = this.FileName + ".tmp";
File.Delete(tempFile);
this.DeleteOnExit(tempFile);
this.TempPath = Path.GetTempFileName();
this.DeleteTempPath();
if (cypherMode == CypherMode.Encryption)
this.CypherFile(this.FileName, tempFile, false);
this.CypherFile(this.FileName, this.TempPath, false);
else
this.RemoveHeader(this.FileName, tempFile);
return tempFile;
this.RemoveHeader(this.FileName, this.TempPath);
return this.TempPath;
}
#endregion