Skip to content

Clean orphan files, temp fix #3902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@
_faviconCacheDir = Path.Combine(
context.CurrentPluginMetadata.PluginCacheDirectoryPath,
"FaviconCache");

try
{
if (Directory.Exists(_faviconCacheDir))
{
var files = Directory.GetFiles(_faviconCacheDir);
foreach (var file in files)
{
var extension = Path.GetExtension(file);
if (extension is ".db-shm" or ".db-wal" or ".sqlite-shm" or ".sqlite-wal")

Check warning on line 48 in Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`wal` is not a recognized word. (unrecognized-spelling)

Check warning on line 48 in Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`shm` is not a recognized word. (unrecognized-spelling)

Check warning on line 48 in Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`wal` is not a recognized word. (unrecognized-spelling)

Check warning on line 48 in Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`shm` is not a recognized word. (unrecognized-spelling)

Check warning on line 48 in Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`wal` is not a recognized word. (unrecognized-spelling)

Check warning on line 48 in Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`shm` is not a recognized word. (unrecognized-spelling)
{
File.Delete(file);
}
}
}
}
catch (Exception e)
{
Context.API.LogException(ClassName, "Failed to clean up orphaned cache files.", e);
}

LoadBookmarksIfEnabled();
}
Expand Down Expand Up @@ -228,7 +248,7 @@
return false;
}
},
IcoPath = @"Images\copylink.png",

Check warning on line 251 in Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`copylink` is not a recognized word. (unrecognized-spelling)
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue8c8")
}
};
Expand Down
Loading