mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #3902 from dcog989/Clean-orphan-files,-temp-fix
Clean orphan files, temp fix
This commit is contained in:
commit
4b41578024
1 changed files with 20 additions and 0 deletions
|
|
@ -36,6 +36,26 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
|
|||
_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")
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.API.LogException(ClassName, "Failed to clean up orphaned cache files.", e);
|
||||
}
|
||||
|
||||
LoadBookmarksIfEnabled();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue