Skip to content

Commit bc68a78

Browse files
Jack251970TBM13
authored andcommitted
Merge pull request Flow-Launcher#3999 from Flow-Launcher/portable_mode_fix
Fix PortableMode Check Issue
1 parent ef6dc59 commit bc68a78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ public static class DataLocation
77
{
88
public const string PortableFolderName = "UserData";
99
public const string DeletionIndicatorFile = ".dead";
10-
public static string PortableDataPath = Path.Combine(Constant.ProgramDirectory, PortableFolderName);
11-
public static string RoamingDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FlowLauncher");
10+
public static readonly string PortableDataPath = Path.Combine(Constant.ProgramDirectory, PortableFolderName);
11+
public static readonly string RoamingDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "FlowLauncher");
1212
public static string DataDirectory()
1313
{
1414
if (PortableDataLocationInUse())
@@ -19,7 +19,8 @@ public static string DataDirectory()
1919

2020
public static bool PortableDataLocationInUse()
2121
{
22-
if (Directory.Exists(PortableDataPath) && !File.Exists(DeletionIndicatorFile))
22+
if (Directory.Exists(PortableDataPath) &&
23+
!File.Exists(Path.Combine(PortableDataPath, DeletionIndicatorFile)))
2324
return true;
2425

2526
return false;

0 commit comments

Comments
 (0)