[DATFromDir, SimpleSort] Only delete tempdir if it's not the default

This commit is contained in:
Matt Nadareski
2016-09-16 17:14:36 -07:00
parent fc27f7c268
commit 2a6f54e8e5
2 changed files with 9 additions and 3 deletions

View File

@@ -179,10 +179,13 @@ namespace SabreTools
});
}
// Now that we're done, delete the temp folder
// Now that we're done, delete the temp folder (if it's not the default)
try
{
Directory.Delete(_tempDir, true);
if (_tempDir != Path.GetTempPath())
{
Directory.Delete(_tempDir, true);
}
}
catch
{

View File

@@ -232,7 +232,10 @@ namespace SabreTools.Helper
{
try
{
Directory.Delete(_tempDir, true);
if (_tempDir != Path.GetTempPath())
{
Directory.Delete(_tempDir, true);
}
}
catch
{