BUG-2089: Fixed a problem when the hotkey registration fails and OneDrive is not installed.

This commit is contained in:
Robin 2016-12-29 16:28:33 +01:00
commit 9a7b95e93d
2 changed files with 5 additions and 1 deletions

View file

@ -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))
{