mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #3999 from Flow-Launcher/portable_mode_fix
Fix PortableMode Check Issue
This commit is contained in:
commit
35867a0a00
2 changed files with 5 additions and 4 deletions
|
|
@ -7,8 +7,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
{
|
||||
public const string PortableFolderName = "UserData";
|
||||
public const string DeletionIndicatorFile = ".dead";
|
||||
public static string PortableDataPath = Path.Combine(Constant.ProgramDirectory, PortableFolderName);
|
||||
public static string RoamingDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FlowLauncher");
|
||||
public static readonly string PortableDataPath = Path.Combine(Constant.ProgramDirectory, PortableFolderName);
|
||||
public static readonly string RoamingDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FlowLauncher");
|
||||
public static string DataDirectory()
|
||||
{
|
||||
if (PortableDataLocationInUse())
|
||||
|
|
@ -19,7 +19,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
|
||||
public static bool PortableDataLocationInUse()
|
||||
{
|
||||
if (Directory.Exists(PortableDataPath) && !File.Exists(DeletionIndicatorFile))
|
||||
if (Directory.Exists(PortableDataPath) &&
|
||||
!File.Exists(Path.Combine(PortableDataPath, DeletionIndicatorFile)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
|
|||
}
|
||||
|
||||
// This is only required to set at startup. When portable mode enabled/disabled a restart is always required
|
||||
private static bool _portableMode = DataLocation.PortableDataLocationInUse();
|
||||
private static readonly bool _portableMode = DataLocation.PortableDataLocationInUse();
|
||||
|
||||
public bool PortableMode
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue