Skip to content

Commit

Permalink
Added extra check
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers committed Jun 2, 2019
1 parent 53c872a commit 0479c2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions KoenZomers.KeePass.OneDriveSync/Providers/OneDriveProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ public static async Task<bool> SyncUsingOneDriveCloudProvider(Configuration data
// Get the folder in which the KeePass file resides
folder = await oneDriveApi.GetItemById(databaseConfig.RemoteFolderId);

if (folder == null)
{
updateStatus("Unable to download database from OneDrive. Remote path cannot be found.");
return false;
}

// Locate the KeePass file in the folder
oneDriveItem = await oneDriveApi.GetItemInFolder(folder, databaseConfig.RemoteFileName);
}
Expand Down

0 comments on commit 0479c2b

Please sign in to comment.