From 92839b004e862e6d6465757cd7c971bbc22c39e7 Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Wed, 27 Mar 2024 19:10:44 -0500 Subject: [PATCH] don't check whether the location exists and use the productversion since that's inherited from assembly version --- Flow.Launcher.Core/Configuration/Portable.cs | 3 --- Flow.Launcher.Infrastructure/Constant.cs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Flow.Launcher.Core/Configuration/Portable.cs b/Flow.Launcher.Core/Configuration/Portable.cs index fe9ac6a0c..826e9f8ac 100644 --- a/Flow.Launcher.Core/Configuration/Portable.cs +++ b/Flow.Launcher.Core/Configuration/Portable.cs @@ -80,15 +80,12 @@ namespace Flow.Launcher.Core.Configuration /// public void PreStartCleanUpAfterPortabilityUpdate() { - var locator = VelopackLocator.GetDefault(null); - // check whether the package locate in %localappdata% // if not create the portable data folder // Don't create the folder if the version is 1.0.0 (Dev) to allow potential debugging with data in the project folder // It is still possible to create the UserData folder for dev version manually but we want to keep the current behavior if (!Constant.ProgramDirectory.IsSubPathOf( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)) - && !DataLocation.PortableDataPath.LocationExists() && Constant.Version != "1.0.0") { Directory.CreateDirectory(DataLocation.PortableDataPath); diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index 40759a643..7a95b52d5 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -20,7 +20,7 @@ namespace Flow.Launcher.Infrastructure public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins); public const string IssuesUrl = "https://github.com/Flow-Launcher/Flow.Launcher/issues"; - public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).FileVersion; + public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion; public static readonly string Dev = "Dev"; public const string Documentation = "https://flowlauncher.com/docs/#/usage-tips";