[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,11 +179,14 @@ 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
{
if (_tempDir != Path.GetTempPath())
{
Directory.Delete(_tempDir, true);
}
}
catch
{
// Just absorb the error for now

View File

@@ -231,9 +231,12 @@ namespace SabreTools.Helper
while (Directory.Exists(_tempDir))
{
try
{
if (_tempDir != Path.GetTempPath())
{
Directory.Delete(_tempDir, true);
}
}
catch
{
continue;