Log a warning when encountering an empty Name

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Jack Ye 2025-05-25 09:19:41 +08:00 committed by GitHub
parent 0d785d1c9c
commit 0258955083
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -198,6 +198,7 @@ namespace Flow.Launcher.Core.Plugin
{
if (string.IsNullOrEmpty(metadata.Name))
{
Log.Warn($"Plugin with empty Name encountered. Skipping plugin initialization. Metadata: {metadata}");
continue; // Skip if Name is not set, which can happen for erroneous plugins
}
metadata.PluginSettingsDirectoryPath = Path.Combine(DataLocation.PluginSettingsDirectory, metadata.Name);