[FileTools] Create and use safe file/directory delete

This commit is contained in:
Matt Nadareski
2017-03-15 14:44:44 -07:00
parent 0995718106
commit 26d49d9e19
6 changed files with 88 additions and 73 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Text;
using SabreTools.Helper.Data;
using SabreTools.Helper.Tools;
#if MONO
using System.IO;
@@ -758,7 +759,7 @@ namespace ROMVault2.SupportedFiles.Zip
_zipstream.Dispose();
// Delete the failed file
File.Delete(_zipFileInfo.FullName);
FileTools.SafeTryDeleteFile(_zipFileInfo.FullName);
_zipFileInfo = null;
_zipOpen = ZipOpenType.Closed;
}