From d2658c710c8849cd40ec537e903fba120a43e583 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 6 Dec 2022 17:57:27 +1100 Subject: [PATCH] add null check --- .../Environments/AbstractPluginEnvironment.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs index c6772677e..9ebacc942 100644 --- a/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs +++ b/Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs @@ -204,6 +204,9 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments private static bool IsUsingPortablePath(string filePath, string pluginEnvironmentName) { + if (string.IsNullOrEmpty(filePath)) + return false; + // DataLocation.PortableDataPath returns the current portable path, this determines if an out // of date path is also a portable path. var portableAppEnvLocation = $"UserData\\{DataLocation.PluginEnvironments}\\{pluginEnvironmentName}"; @@ -213,6 +216,9 @@ namespace Flow.Launcher.Core.ExternalPlugins.Environments private static bool IsUsingRoamingPath(string filePath) { + if (string.IsNullOrEmpty(filePath)) + return false; + return filePath.StartsWith(DataLocation.RoamingDataPath); }