diff --git a/SabreTools.Helper/Objects/DATFromDir.cs b/SabreTools.Helper/Objects/DATFromDir.cs index 578671eb..0d935793 100644 --- a/SabreTools.Helper/Objects/DATFromDir.cs +++ b/SabreTools.Helper/Objects/DATFromDir.cs @@ -273,12 +273,6 @@ namespace SabreTools // If the file was an archive and was extracted successfully, check it if (!encounteredErrors) { - // Cue to delete the file if it's a copy - if (_copyFiles && item != newItem) - { - FileTools.CleanDirectory(Path.GetDirectoryName(Path.GetFullPath(newItem))); - } - _logger.Log(Path.GetFileName(item) + " treated like an archive"); List extracted = Directory.EnumerateFiles(tempSubDir, "*", SearchOption.AllDirectories).ToList(); Parallel.ForEach(extracted, @@ -303,7 +297,7 @@ namespace SabreTools // Cue to delete the file if it's a copy if (_copyFiles && item != newItem) { - FileTools.CleanDirectory(Path.GetDirectoryName(Path.GetFullPath(newItem))); + Directory.Delete(Path.GetDirectoryName(Path.GetFullPath(newItem)), true); } // Delete the sub temp directory