mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
Ignore exceptions when removing temporary files.
Need to investigate why anyway.
This commit is contained in:
@@ -348,7 +348,18 @@ public partial class ImportRoms : ComponentBase
|
|||||||
if(File.Exists(tmpFile)) File.Delete(tmpFile);
|
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
|
finally
|
||||||
{
|
{
|
||||||
Interlocked.Increment(ref _listPosition);
|
Interlocked.Increment(ref _listPosition);
|
||||||
|
|||||||
@@ -446,7 +446,18 @@ public sealed partial class ImportRomFolderViewModel : ViewModelBase
|
|||||||
if(File.Exists(tmpFile)) File.Delete(tmpFile);
|
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
|
finally
|
||||||
{
|
{
|
||||||
Interlocked.Increment(ref _listPosition);
|
Interlocked.Increment(ref _listPosition);
|
||||||
|
|||||||
Reference in New Issue
Block a user