#1950: When custom personal path is empty, show preview of default portable path properly

This commit is contained in:
Jaex 2016-09-30 12:53:16 +03:00
parent 8bdfdccbec
commit 5e79bd7b2a
2 changed files with 14 additions and 3 deletions

View file

@ -294,7 +294,18 @@ private void UpdatePersonalFolderPathPreview()
if (string.IsNullOrEmpty(personalPath))
{
personalPath = Program.DefaultPersonalFolder;
if (Program.PortableApps)
{
personalPath = Program.PortableAppsPersonalFolder;
}
else if (Program.Portable)
{
personalPath = Program.PortablePersonalFolder;
}
else
{
personalPath = Program.DefaultPersonalFolder;
}
}
else
{

View file

@ -104,8 +104,8 @@ public static string Title
private const string PersonalPathConfigFileName = "PersonalPath.cfg";
public static readonly string DefaultPersonalFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), AppName);
private static readonly string PortablePersonalFolder = Helpers.GetAbsolutePath(AppName);
private static readonly string PortableAppsPersonalFolder = Helpers.GetAbsolutePath("../../Data");
public static readonly string PortablePersonalFolder = Helpers.GetAbsolutePath(AppName);
public static readonly string PortableAppsPersonalFolder = Helpers.GetAbsolutePath("../../Data");
private static string PersonalPathConfigFilePath
{