Skip to content

Commit

Permalink
#376 Fix backups not working in the root directory. Fixes #327.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyrodan committed Jun 17, 2024
1 parent 53cb5a5 commit e8e278a
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);

Expand Down

0 comments on commit e8e278a

Please sign in to comment.