From a1a4c720c0d28b75a700d50597c45a9fead17a32 Mon Sep 17 00:00:00 2001 From: TheBestPessimist Date: Wed, 8 Mar 2023 12:47:57 +0200 Subject: [PATCH] More comments --- .../Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs index 25fe657c1..0eb16faa7 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs @@ -226,17 +226,19 @@ namespace Flow.Launcher.Plugin.Explorer.Search // TODO Why do we check if file exists here, but not in the other if conditions? if (File.Exists(filePath) && c.SpecialKeyState.CtrlPressed && c.SpecialKeyState.ShiftPressed) { + // run the file as admin IncrementRunCounterIfNeeded(filePath); OpenFileAsAdmin(filePath); } else if (c.SpecialKeyState.CtrlPressed) { + // open folder and select this file IncrementRunCounterIfNeeded(filePath); - FilesFolders.OpenContainingFolder(filePath); + Context.API.OpenDirectory(Path.GetDirectoryName(filePath), filePath); } - else { + // run the file IncrementRunCounterIfNeeded(filePath); FilesFolders.OpenPath(filePath); }