From 9e88119fd9da9d46b8082486f71bcd4337c3e0c9 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 13 Jul 2016 17:33:28 +0200 Subject: [PATCH] BUG-1992: Fixed a problem with the OutputFilePath & OutputFileAsFullpath configuration values when using the Greenshot configuration on different PC's. --- GreenshotPlugin/Core/CoreConfiguration.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/GreenshotPlugin/Core/CoreConfiguration.cs b/GreenshotPlugin/Core/CoreConfiguration.cs index 68ffe9a5b..07a4eaf4a 100644 --- a/GreenshotPlugin/Core/CoreConfiguration.cs +++ b/GreenshotPlugin/Core/CoreConfiguration.cs @@ -518,7 +518,16 @@ namespace GreenshotPlugin.Core { if (WebRequestReadWriteTimeout < 1) { WebRequestReadWriteTimeout = 100; } - } + // Added for BUG-1992, reset the OutputFilePath / OutputFileAsFullpath if they don't exist (e.g. the configuration is used on a different PC) + if (!Directory.Exists(OutputFilePath)) + { + OutputFilePath = GetDefault(nameof(OutputFilePath)) as string; + } + if (!File.Exists(OutputFileAsFullpath)) + { + OutputFileAsFullpath = GetDefault(nameof(OutputFileAsFullpath)) as string; + } + } } } \ No newline at end of file