BUG-2114: Fixed totaly f***ed up fix, this should be better.

This commit is contained in:
Robin 2017-01-18 19:45:27 +01:00
commit 9e9d058fdc
3 changed files with 26 additions and 12 deletions

View file

@ -115,11 +115,7 @@ namespace Greenshot.Destinations {
pattern = "greenshot ${capturetime}";
}
string filename = FilenameHelper.GetFilenameFromPattern(pattern, CoreConfig.OutputFileFormat, captureDetails);
// Added for BUG-1992, reset the OutputFilePath / OutputFileAsFullpath if they don't exist (e.g. the configuration is used on a different PC)
if (!File.Exists(CoreConfig.OutputFilePath))
{
CoreConfig.OutputFilePath = CoreConfig.GetDefault(nameof(CoreConfig.OutputFilePath)) as string;
}
CoreConfig.ValidateAndCorrectOutputFilePath();
string filepath = FilenameHelper.FillVariables(CoreConfig.OutputFilePath, false);
try {
fullPath = Path.Combine(filepath, filename);