mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
#1950: Workaround for custom screenshot folder not shows preview when folder is not exists
This commit is contained in:
parent
c8ac26d8dd
commit
e3a33affea
1 changed files with 16 additions and 7 deletions
|
@ -233,18 +233,27 @@ public static string ScreenshotsParentFolder
|
|||
{
|
||||
if (Settings != null && Settings.UseCustomScreenshotsPath)
|
||||
{
|
||||
string customPath = Helpers.ExpandFolderVariables(Settings.CustomScreenshotsPath);
|
||||
string path = Settings.CustomScreenshotsPath;
|
||||
string path2 = Settings.CustomScreenshotsPath2;
|
||||
|
||||
if (Directory.Exists(customPath))
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
return customPath;
|
||||
path = Helpers.ExpandFolderVariables(path);
|
||||
|
||||
if (string.IsNullOrEmpty(path2) || Directory.Exists(path))
|
||||
{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
customPath = Helpers.ExpandFolderVariables(Settings.CustomScreenshotsPath2);
|
||||
|
||||
if (Directory.Exists(customPath))
|
||||
if (!string.IsNullOrEmpty(path2))
|
||||
{
|
||||
return customPath;
|
||||
path2 = Helpers.ExpandFolderVariables(path2);
|
||||
|
||||
if (Directory.Exists(path2))
|
||||
{
|
||||
return path2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue