[DatFrmDir] Make the temp dir more predicatble

This commit is contained in:
Matt Nadareski
2016-06-20 23:51:58 -07:00
parent fc5fdb24df
commit 79ee37100b

View File

@@ -292,7 +292,7 @@ namespace SabreTools
// Define the temporary directory
string tempdir = (String.IsNullOrEmpty(_tempDir) ? Environment.CurrentDirectory : _tempDir);
tempdir += (tempdir.EndsWith(Path.DirectorySeparatorChar.ToString()) ? "" : Path.DirectorySeparatorChar.ToString());
tempdir += "temp" + DateTime.Now.ToString("yyyyMMddHHmmss") + Path.DirectorySeparatorChar;
tempdir += "__temp__" + Path.DirectorySeparatorChar;
// Special case for if we are in Romba mode (all names are supposed to be SHA-1 hashes)
if (_datdata.Romba)
@@ -340,7 +340,7 @@ namespace SabreTools
// Clear the temp directory
if (Directory.Exists(tempdir))
{
Directory.Delete(tempdir, true);
Output.CleanDirectory(tempdir);
}
}
// Otherwise, just get the info on the file itself