From 93d9667c04b7c2aec3374b7236e5a15a13afe6f4 Mon Sep 17 00:00:00 2001 From: Jack Ye <1160210343@qq.com> Date: Sun, 28 Sep 2025 11:49:28 +0800 Subject: [PATCH] Reject blank directory names Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs index 8fb1b6d8f..db5bc53ce 100644 --- a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs +++ b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs @@ -393,6 +393,7 @@ namespace Flow.Launcher.Plugin.SharedCommands /// public static bool IsValidDirectoryName(string name) { + if (string.IsNullOrWhiteSpace(name)) return false; if (IsReservedName(name)) return false; var invalidChars = Path.GetInvalidPathChars().Concat(new[] { '/', '\\' }).ToArray(); if (name.IndexOfAny(invalidChars) >= 0)