mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DATFromDir] Put retry on intial delete too
This commit is contained in:
@@ -320,11 +320,19 @@ namespace SabreTools
|
||||
// Cue to delete the file if it's a copy
|
||||
if (_copyFiles)
|
||||
{
|
||||
try
|
||||
int i = 0;
|
||||
while (File.Exists(newItem) && i < 50)
|
||||
{
|
||||
Directory.Delete(Path.GetDirectoryName(newItem), true);
|
||||
try
|
||||
{
|
||||
Directory.Delete(Path.GetDirectoryName(newItem), true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
catch
|
||||
if (File.Exists(newItem))
|
||||
{
|
||||
_clean.Add(newItem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user