More comments

This commit is contained in:
TheBestPessimist 2023-03-08 12:47:57 +02:00 committed by TheBestPessimist
parent a9192541ab
commit a1a4c720c0

View file

@ -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);
}