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