From 95eaa79c703200cdae6cca6111f66a94ef01db77 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 17 May 2025 21:36:33 +0800 Subject: [PATCH] Improve code logic --- Flow.Launcher/PublicAPIInstance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 0e32ffae5..828779f0a 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -316,6 +316,7 @@ namespace Flow.Launcher public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null) { + using var explorer = new Process(); var explorerInfo = _settings.CustomExplorer; var explorerPath = explorerInfo.Path.Trim().ToLowerInvariant(); var targetPath = FileNameOrFilePath is null @@ -324,7 +325,6 @@ namespace Flow.Launcher ? FileNameOrFilePath : Path.Combine(DirectoryPath, FileNameOrFilePath); - using var explorer = new Process(); if (Path.GetFileNameWithoutExtension(explorerPath) == "explorer") { // Windows File Manager