mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DATFromDir, SimpleSort] Only delete tempdir if it's not the default
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -231,9 +231,12 @@ namespace SabreTools.Helper
|
||||
while (Directory.Exists(_tempDir))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_tempDir != Path.GetTempPath())
|
||||
{
|
||||
Directory.Delete(_tempDir, true);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user