From 0b7c0408f8f8f190614fad6f069c396ef0687249 Mon Sep 17 00:00:00 2001 From: Jack Ye <1160210343@qq.com> Date: Sun, 21 Sep 2025 21:49:51 +0800 Subject: [PATCH] Null check order bug can throw NRE Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- Plugins/Flow.Launcher.Plugin.Explorer/Helper/RenameThing.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/RenameThing.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/RenameThing.cs index 2711d2e92..b29d75ff2 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Helper/RenameThing.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Helper/RenameThing.cs @@ -62,7 +62,7 @@ public static class RenameThing public static void Rename(string NewFileName, FileSystemInfo oldInfo) { // if it's just whitespace and nothing else - if (string.IsNullOrEmpty(NewFileName.Trim()) || string.IsNullOrEmpty(NewFileName)) + if (string.IsNullOrWhiteSpace(NewFileName)) { Main.Context.API.ShowMsgError(Localize.plugin_explorer_field_may_not_be_empty()); return;