From 165e498a9450c6bb5f05a256b2e96e87564ed340 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Mon, 12 May 2025 15:12:23 +0800 Subject: [PATCH] Fix exception when deleteing temp files --- .../ChromiumBookmarkLoader.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs index 66be08903..e859976bd 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs @@ -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; }