Log exception when deleting failed

This commit is contained in:
Jack251970 2025-03-20 16:03:41 +08:00
parent 02d09160a3
commit 977a8f8c47
2 changed files with 24 additions and 3 deletions

View file

@ -200,7 +200,14 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
// Delete temporary file
try { File.Delete(tempDbPath); } catch { /* Ignore */ }
try
{
File.Delete(tempDbPath);
}
catch (Exception ex)
{
Log.Exception($"Failed to delete temporary favicon DB: {tempDbPath}", ex);
}
}
catch (Exception ex)
{

View file

@ -85,7 +85,14 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
// Delete temporary file
try { File.Delete(tempDbPath); } catch { /* Ignore */ }
try
{
File.Delete(tempDbPath);
}
catch (Exception ex)
{
Log.Exception($"Failed to delete temporary favicon DB: {tempDbPath}", ex);
}
}
catch (Exception ex)
{
@ -159,7 +166,14 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
// Delete temporary file
try { File.Delete(tempDbPath); } catch { /* Ignore */ }
try
{
File.Delete(tempDbPath);
}
catch (Exception ex)
{
Log.Exception($"Failed to delete temporary favicon DB: {tempDbPath}", ex);
}
}
catch (Exception ex)
{