Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ public static class DataLocation
{
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())
Expand All @@ -19,7 +19,8 @@ public static string DataDirectory()

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public List<int> ScreenNumbers
}

// 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
{
Expand Down
Loading