[DATFromDir] Move file delete outside so it tries to catch everything

This commit is contained in:
Matt Nadareski
2016-09-22 10:49:37 -07:00
parent bcab3b72d0
commit cfeccbb43d
2 changed files with 12 additions and 17 deletions

View File

@@ -291,18 +291,18 @@ namespace SabreTools
{
ProcessFile(newItem, newBasePath, "");
}
}
// Cue to delete the file if it's a copy
if (_copyFiles)
{
FileTools.DeleteFile(newItem);
}
// Cue to delete the file if it's a copy
if (_copyFiles && item != newItem)
{
FileTools.DeleteFile(newItem);
}
// Delete the sub temp directory
if (Directory.Exists(tempSubDir))
{
Directory.Delete(tempSubDir, true);
}
// Delete the sub temp directory
if (Directory.Exists(tempSubDir))
{
Directory.Delete(tempSubDir, true);
}
}

View File

@@ -1,5 +1,4 @@
//using Ionic.Zlib;
using OCRC;
using OCRC;
using SharpCompress.Archive;
using SharpCompress.Archive.SevenZip;
using SharpCompress.Common;
@@ -9,7 +8,6 @@ using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Security.AccessControl;
using System.Security.Cryptography;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
@@ -1256,10 +1254,7 @@ namespace SabreTools.Helper
{
fi.Delete();
}
catch
{
}
catch { }
}
});
}