Ignore exceptions when removing temporary files.

Need to investigate why anyway.
This commit is contained in:
2025-07-31 04:13:00 +01:00
parent 2942c6dfc8
commit d26000c7c8
2 changed files with 24 additions and 2 deletions

View File

@@ -446,7 +446,18 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
if(File.Exists(tmpFile)) File.Delete(tmpFile);
}
}
catch(InvalidOperationException) {}
try
{
if(File.Exists(tmpFile)) File.Delete(tmpFile);
}
catch(IOException)
#pragma warning disable PH2098
{
// Ignore IO exceptions when deleting temporary files
}
#pragma warning restore PH2098
}
}
finally
{
Interlocked.Increment(ref _listPosition);