From 58de62565ab9c86e00ef6433ab937d623a45db60 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Mon, 24 Feb 2025 14:14:19 +0800 Subject: [PATCH] Do not validate plugin settings & cache path --- Flow.Launcher.Core/Plugin/PluginManager.cs | 7 ++----- Flow.Launcher.Plugin/PluginMetadata.cs | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs index c88937c75..bbd189efb 100644 --- a/Flow.Launcher.Core/Plugin/PluginManager.cs +++ b/Flow.Launcher.Core/Plugin/PluginManager.cs @@ -152,10 +152,10 @@ namespace Flow.Launcher.Core.Plugin Settings = settings; Settings.UpdatePluginSettings(_metadatas); AllPlugins = PluginsLoader.Plugins(_metadatas, Settings); - UpdateAndValidatePluginDirectory(_metadatas); + UpdatePluginDirectory(_metadatas); } - private static void UpdateAndValidatePluginDirectory(List metadatas) + private static void UpdatePluginDirectory(List metadatas) { foreach (var metadata in metadatas) { @@ -169,9 +169,6 @@ namespace Flow.Launcher.Core.Plugin metadata.PluginSettingsDirectoryPath = Path.Combine(DataLocation.PluginSettingsDirectory, metadata.Name); metadata.PluginCacheDirectoryPath = Path.Combine(DataLocation.PluginCacheDirectory, metadata.Name); } - - Helper.ValidateDirectory(metadata.PluginSettingsDirectoryPath); - Helper.ValidateDirectory(metadata.PluginCacheDirectoryPath); } } diff --git a/Flow.Launcher.Plugin/PluginMetadata.cs b/Flow.Launcher.Plugin/PluginMetadata.cs index 6dc8acc63..dae8f58fd 100644 --- a/Flow.Launcher.Plugin/PluginMetadata.cs +++ b/Flow.Launcher.Plugin/PluginMetadata.cs @@ -123,7 +123,7 @@ namespace Flow.Launcher.Plugin public int QueryCount { get; set; } /// - /// The path to the plugin settings directory. + /// The path to the plugin settings directory which is not validated. /// It is used to store plugin settings files and data files. /// When plugin is deleted, FL will ask users whether to keep its settings. /// If users do not want to keep, this directory will be deleted. @@ -132,7 +132,7 @@ namespace Flow.Launcher.Plugin public string PluginSettingsDirectoryPath { get; internal set; } /// - /// The path to the plugin cache directory. + /// The path to the plugin cache directory which is not validated. /// It is used to store cache files. /// When plugin is deleted, this directory will be deleted as well. ///