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
|
// Cue to delete the file if it's a copy
|
||||||
if (_copyFiles)
|
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);
|
_clean.Add(newItem);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -441,11 +441,13 @@ namespace SabreTools.Helper
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static int CompareNumeric(string s, string other)
|
public static int CompareNumeric(string s, string other)
|
||||||
{
|
{
|
||||||
if ((s == null || s.Replace(" ", string.Empty).Length == 0) && (other != null && other.Replace(" ", string.Empty).Length > 0))
|
if ((s == null || s.Replace(" ", string.Empty).Length == 0)
|
||||||
|
&& (other != null && other.Replace(" ", string.Empty).Length > 0))
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if ((s != null && s.Replace(" ", string.Empty).Length > 0) && (other == null || other.Replace(" ", string.Empty).Length == 0))
|
if ((s != null && s.Replace(" ", string.Empty).Length > 0)
|
||||||
|
&& (other == null || other.Replace(" ", string.Empty).Length == 0))
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user