From 8f718fdcf381b833fade54faaf2bcd370ae8d70e Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 27 Mar 2024 17:32:24 -0500 Subject: [PATCH] try again --- Flow.Launcher.Core/Configuration/Portable.cs | 7 ++----- Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs | 6 ++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher.Core/Configuration/Portable.cs b/Flow.Launcher.Core/Configuration/Portable.cs index 2d473c806..fe9ac6a0c 100644 --- a/Flow.Launcher.Core/Configuration/Portable.cs +++ b/Flow.Launcher.Core/Configuration/Portable.cs @@ -95,11 +95,8 @@ namespace Flow.Launcher.Core.Configuration } // Specify here so this method does not rely on other environment variables to initialise - var portableDataDir = - Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location.NonNull()).ToString(), - "UserData"); - var roamingDataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), - "FlowLauncher"); + var portableDataDir = DataLocation.PortableDataPath; + var roamingDataDir = DataLocation.RoamingDataPath; // Get full path to the .dead files for each case diff --git a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs index f25f9fe2a..1341318e0 100644 --- a/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs +++ b/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs @@ -15,6 +15,12 @@ namespace Flow.Launcher.Plugin.SharedCommands { private const string FileExplorerProgramName = "explorer"; + /// + /// Checks if is a subpath of + /// + /// + /// + /// public static bool IsSubPathOf(this string subPath, string basePath) { var rel = Path.GetRelativePath(