Fix exception when deleteing temp files

This commit is contained in:
Jack251970 2025-05-12 15:12:23 +08:00
parent ea4360a3d3
commit 165e498a94

View file

@ -131,7 +131,17 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
File.Delete(tempDbPath);
try
{
if (File.Exists(tempDbPath))
{
File.Delete(tempDbPath);
}
}
catch (Exception ex1)
{
Main._context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex1);
}
Main._context.API.LogException(ClassName, $"Failed to copy favicon DB: {dbPath}", ex);
return;
}