From 47878f3829a9cb10f87d5429d07fad097efec3dd Mon Sep 17 00:00:00 2001 From: DB p Date: Tue, 27 May 2025 14:08:32 +0900 Subject: [PATCH] Fix file explorer invocation to ensure correct file selection behavior --- Flow.Launcher/PublicAPIInstance.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 66e11f881..93567288c 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -338,7 +338,10 @@ namespace Flow.Launcher // Windows File Manager explorer.StartInfo = new ProcessStartInfo { - FileName = targetPath, + FileName = "explorer.exe", + Arguments = FileNameOrFilePath is null + ? DirectoryPath // only open the directory + : $"/select,\"{targetPath}\"", // open the directory and select the file UseShellExecute = true }; }