Skip to content

Commit 95eaa79

Browse files
committed
Improve code logic
1 parent b5a17b4 commit 95eaa79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ public void SavePluginSettings()
316316

317317
public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null)
318318
{
319+
using var explorer = new Process();
319320
var explorerInfo = _settings.CustomExplorer;
320321
var explorerPath = explorerInfo.Path.Trim().ToLowerInvariant();
321322
var targetPath = FileNameOrFilePath is null
@@ -324,7 +325,6 @@ public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null
324325
? FileNameOrFilePath
325326
: Path.Combine(DirectoryPath, FileNameOrFilePath);
326327

327-
using var explorer = new Process();
328328
if (Path.GetFileNameWithoutExtension(explorerPath) == "explorer")
329329
{
330330
// Windows File Manager

0 commit comments

Comments
 (0)