[DatFile] Fix temp directory in verify

This commit is contained in:
Matt Nadareski
2017-01-26 18:09:16 -08:00
parent 1def9c0226
commit 52c50f54a7

View File

@@ -474,7 +474,13 @@ namespace SabreTools.Helper.Dats
/// <returns>True if verification was a success, false otherwise</returns>
public bool VerifyDirectory(List<string> inputs, string tempDir, bool hashOnly, string headerToCheckAgainst, Logger logger)
{
// First create or clean the temp directory
// Check the temp directory exists
if (String.IsNullOrEmpty(tempDir))
{
tempDir = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
}
// Then create or clean the temp directory
if (!Directory.Exists(tempDir))
{
Directory.CreateDirectory(tempDir);