add delay for copying a file

This commit is contained in:
Pascal Schedel
2024-12-04 14:33:13 +01:00
parent a8146ba7a9
commit f2682b8200

View File

@@ -42,6 +42,7 @@ public static class Utils
oldFile = destFileName + ".old"; oldFile = destFileName + ".old";
File.Move(destFileName, oldFile, true); File.Move(destFileName, oldFile, true);
triesLeft++; triesLeft++;
Thread.Sleep(1000);
} }
} }
catch (Exception) catch (Exception)
@@ -54,6 +55,7 @@ public static class Utils
try try
{ {
File.Delete(oldFile); File.Delete(oldFile);
Thread.Sleep(1000);
} }
catch (Exception) catch (Exception)
{ {