ExpandFolderVariables before checking directory

This commit is contained in:
Michael Delpach 2016-08-20 16:22:51 +08:00
parent 66cac748f2
commit 391bfdb28d

View file

@ -234,13 +234,13 @@ public static string ScreenshotsParentFolder
if (Settings != null && Settings.UseCustomScreenshotsPath)
{
string customPath = "";
if (Directory.Exists(Settings.CustomScreenshotsPath))
if (Directory.Exists(Helpers.ExpandFolderVariables(Settings.CustomScreenshotsPath)))
customPath = Settings.CustomScreenshotsPath;
else if (Directory.Exists(Settings.CustomScreenshotsPath2))
else if (Directory.Exists(Helpers.ExpandFolderVariables(Settings.CustomScreenshotsPath2)))
customPath = Settings.CustomScreenshotsPath2;
if (!string.IsNullOrEmpty(customPath))
return Helpers.ExpandFolderVariables(customPath);
return customPath;
}
return Path.Combine(PersonalFolder, "Screenshots");