diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs index 16f0a0798..a20baccb5 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs @@ -132,6 +132,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader // Use a copy to avoid lock issues with the original file var tempDbPath = Path.Combine(_faviconCacheDir, $"tempfavicons_{Guid.NewGuid()}.db"); + // Use a copy to avoid lock issues with the original file try { File.Copy(dbPath, tempDbPath, true); diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs index d387cd7b5..11fc688e7 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs @@ -60,7 +60,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader File.Copy(placesPath, tempDbPath, true); // Create the connection string and init the connection - string dbPath = string.Format(DbPathFormat, tempDbPath); + var dbPath = string.Format($"Data Source={tempDbPath};Mode=ReadOnly"); using var dbConnection = new SqliteConnection(dbPath); // Open connection to the database file and execute the query @@ -119,8 +119,10 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader private void LoadFaviconsFromDb(string faviconDbPath, List bookmarks) { + // Use a copy to avoid lock issues with the original file var tempDbPath = Path.Combine(_faviconCacheDir, $"tempfavicons_{Guid.NewGuid()}.sqlite"); + // Use a copy to avoid lock issues with the original file try { // Use a copy to avoid lock issues with the original file