Add safety check for deleting corrupted files
MODIFY
WalletWasabi/Services/UpdateManager.cs
WalletWasabi/Services/UpdateManager.cs
@@ -174,13 +174,15 @@ public class UpdateManager : IDisposable
private void EnsureToRemoveCorruptedFiles()
{
DirectoryInfo folder = new(InstallerDir);
-
+ if (folder.Exists)
+ {
IEnumerable<FileSystemInfo> corruptedFiles = folder.GetFileSystemInfos().Where(file => file.Name.Contains("tmp"));
foreach (var file in corruptedFiles)
{
File.Delete(file.FullName);
}
}
+ }
private void Cleanup()
{

Add safety check for deleting corrupted files