Skip to content

Commit 165e498

Browse files
committed
Fix exception when deleteing temp files
1 parent ea4360a commit 165e498

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,17 @@ private void LoadFaviconsFromDb(string dbPath, List<Bookmark> bookmarks)
131131
}
132132
catch (Exception ex)
133133
{
134-
File.Delete(tempDbPath);
134+
try
135+
{
136+
if (File.Exists(tempDbPath))
137+
{
138+
File.Delete(tempDbPath);
139+
}
140+
}
141+
catch (Exception ex1)
142+
{
143+
Main._context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex1);
144+
}
135145
Main._context.API.LogException(ClassName, $"Failed to copy favicon DB: {dbPath}", ex);
136146
return;
137147
}

0 commit comments

Comments
 (0)