From 9a7b95e93d31245f2304a1c0e52307af5d45fda3 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 29 Dec 2016 16:28:33 +0100 Subject: [PATCH] BUG-2089: Fixed a problem when the hotkey registration fails and OneDrive is not installed. --- Greenshot/Forms/MainForm.cs | 5 ++++- Greenshot/releases/additional_files/readme.txt.template | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Greenshot/Forms/MainForm.cs b/Greenshot/Forms/MainForm.cs index d5d275398..b8164fba4 100644 --- a/Greenshot/Forms/MainForm.cs +++ b/Greenshot/Forms/MainForm.cs @@ -616,7 +616,10 @@ namespace Greenshot { } var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); var oneDriveSettingsPath = Path.Combine(localAppData, @"Microsoft\OneDrive\settings\Personal"); - + if (!Directory.Exists(oneDriveSettingsPath)) + { + return false; + } var oneDriveSettingsFile = Directory.GetFiles(oneDriveSettingsPath, "*_screenshot.dat").FirstOrDefault(); if (!File.Exists(oneDriveSettingsFile)) { diff --git a/Greenshot/releases/additional_files/readme.txt.template b/Greenshot/releases/additional_files/readme.txt.template index e341bfed0..725c23570 100644 --- a/Greenshot/releases/additional_files/readme.txt.template +++ b/Greenshot/releases/additional_files/readme.txt.template @@ -12,6 +12,7 @@ All details to our tickets can be found here: https://greenshot.atlassian.net * BUG-2065 Overflow Error * BUG-2079 Problem with authentication in JIRA plugin * BUG-2080 Exception when opening the context menu +* BUG-2089 Greenshot crashes when hotkey registration fails and OneDrive is not installed * FEATURE-992 Open Greenshot in foreground * FEATURE-995 Setting to paste new images inside greenshot based on cursor location * FEATURE-998 Open Last Capture File should select/jump to the file