mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add code comments & Improve code quality
This commit is contained in:
parent
72bd4c202a
commit
0ec38faf1d
2 changed files with 4 additions and 1 deletions
|
|
@ -132,6 +132,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
|
||||||
// Use a copy to avoid lock issues with the original file
|
// Use a copy to avoid lock issues with the original file
|
||||||
var tempDbPath = Path.Combine(_faviconCacheDir, $"tempfavicons_{Guid.NewGuid()}.db");
|
var tempDbPath = Path.Combine(_faviconCacheDir, $"tempfavicons_{Guid.NewGuid()}.db");
|
||||||
|
|
||||||
|
// Use a copy to avoid lock issues with the original file
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.Copy(dbPath, tempDbPath, true);
|
File.Copy(dbPath, tempDbPath, true);
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
|
||||||
File.Copy(placesPath, tempDbPath, true);
|
File.Copy(placesPath, tempDbPath, true);
|
||||||
|
|
||||||
// Create the connection string and init the connection
|
// 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);
|
using var dbConnection = new SqliteConnection(dbPath);
|
||||||
|
|
||||||
// Open connection to the database file and execute the query
|
// 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<Bookmark> bookmarks)
|
private void LoadFaviconsFromDb(string faviconDbPath, List<Bookmark> bookmarks)
|
||||||
{
|
{
|
||||||
|
// Use a copy to avoid lock issues with the original file
|
||||||
var tempDbPath = Path.Combine(_faviconCacheDir, $"tempfavicons_{Guid.NewGuid()}.sqlite");
|
var tempDbPath = Path.Combine(_faviconCacheDir, $"tempfavicons_{Guid.NewGuid()}.sqlite");
|
||||||
|
|
||||||
|
// Use a copy to avoid lock issues with the original file
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Use a copy to avoid lock issues with the original file
|
// Use a copy to avoid lock issues with the original file
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue