From 9bc6a4e0726506aa106d325be6d30fcea27aedf6 Mon Sep 17 00:00:00 2001 From: TheBestPessimist Date: Wed, 8 Mar 2023 12:10:43 +0200 Subject: [PATCH] Waiting on a semaphore must be outside of `try` --- .../Search/Everything/EverythingAPI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs index 997840ecf..579c5075f 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/Everything/EverythingAPI.cs @@ -184,9 +184,9 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything public static async Task IncrementRunCounterAsync(string fileOrFolder) { + await _semaphore.WaitAsync(TimeSpan.FromSeconds(1)); try { - await _semaphore.WaitAsync(TimeSpan.FromSeconds(1)); _ = EverythingApiDllImport.Everything_IncRunCountFromFileName(fileOrFolder); } catch (Exception)