From 5c33b0d5902b64ca3513291227b04e628d665ce2 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 7 Oct 2022 10:47:49 -0400 Subject: [PATCH] Only convert relative paths if its a valid path --- Flow.Launcher.Plugin/Result.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index c784d60e0..31ef01258 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -130,13 +130,16 @@ namespace Flow.Launcher.Plugin get { return _pluginDirectory; } set { - Uri uriResult; - bool IsUriScheme = Uri.TryCreate(IcoPath, UriKind.Absolute, out uriResult) - && (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps); _pluginDirectory = value; - if (!string.IsNullOrEmpty(IcoPath) && !Path.IsPathRooted(IcoPath) && !IsUriScheme) + if (!string.IsNullOrEmpty(IcoPath) && !Path.IsPathRooted(IcoPath)) { - IcoPath = Path.Combine(value, IcoPath); + string absPath = Path.Combine(value, IcoPath); + // Only convert relative paths if its a valid path + if (File.Exists(absPath)) + { + IcoPath = absPath; + } + } } }