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);