From e8e278a96b9f2c219260e5edd952735076d3d2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=B6lts?= Date: Mon, 17 Jun 2024 12:36:04 +0200 Subject: [PATCH] #376 Fix backups not working in the root directory. Fixes #327. --- .../GoogleDrive/GoogleDriveStorageProvider.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/KeeAnywhere/StorageProviders/GoogleDrive/GoogleDriveStorageProvider.cs b/KeeAnywhere/StorageProviders/GoogleDrive/GoogleDriveStorageProvider.cs index 7a047cb..64c3294 100644 --- a/KeeAnywhere/StorageProviders/GoogleDrive/GoogleDriveStorageProvider.cs +++ b/KeeAnywhere/StorageProviders/GoogleDrive/GoogleDriveStorageProvider.cs @@ -90,9 +90,6 @@ public async Task Copy(string sourcePath, string destPath) var destFilename = CloudPath.GetFileName(destPath); var destFolder = CloudPath.GetDirectoryName(destPath); - var parentFolder = await api.GetFileByPath(destFolder, true); - if (parentFolder == null) - throw new FileNotFoundException("Google Drive: File not found.", destFolder); var destFile = new File { Name = destFilename, @@ -101,7 +98,7 @@ public async Task Copy(string sourcePath, string destPath) if (!string.IsNullOrEmpty(destFolder)) { - var parentFolder = await api.GetFileByPath(destFolder); + var parentFolder = await api.GetFileByPath(destFolder, true); if (parentFolder == null) throw new FileNotFoundException("Google Drive: File not found.", destFolder);