mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
BUG-1671: Fixed error that occurred when double-clicking systray icon before the first time a screenshot was saved to file
This commit is contained in:
parent
af946cf6b4
commit
42437772ad
2 changed files with 13 additions and 7 deletions
|
@ -1249,13 +1249,18 @@ namespace Greenshot {
|
|||
switch (clickAction) {
|
||||
case ClickActions.OPEN_LAST_IN_EXPLORER:
|
||||
string path = null;
|
||||
string configPath = FilenameHelper.FillVariables(_conf.OutputFilePath, false);
|
||||
string lastFilePath = Path.GetDirectoryName(_conf.OutputFileAsFullpath);
|
||||
if (lastFilePath != null && Directory.Exists(lastFilePath)) {
|
||||
path = lastFilePath;
|
||||
} else if (Directory.Exists(configPath)) {
|
||||
path = configPath;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(_conf.OutputFileAsFullpath)) {
|
||||
string lastFilePath = Path.GetDirectoryName(_conf.OutputFileAsFullpath);
|
||||
if (!string.IsNullOrEmpty(lastFilePath) && Directory.Exists(lastFilePath)) {
|
||||
path = lastFilePath;
|
||||
}
|
||||
}
|
||||
if (path == null) {
|
||||
string configPath = FilenameHelper.FillVariables(_conf.OutputFilePath, false);
|
||||
if (Directory.Exists(configPath)) {
|
||||
path = configPath;
|
||||
}
|
||||
}
|
||||
|
||||
if (path != null) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue