Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

drive: fix change notify picking up files outside the root

Nick Craig-Woodd8f4cd4d5fdf
diff --git a/backend/drive/drive.go b/backend/drive/drive.go
index 96214d503..c3cf25ded 100644
--- a/backend/drive/drive.go
+++ b/backend/drive/drive.go
@@ -2880,6 +2880,7 @@ func (f *Fs) changeNotifyRunner(ctx context.Context, notifyFunc func(string, fs.
if f.rootFolderID == "appDataFolder" {
changesCall.Spaces("appDataFolder")
}
+ changesCall.RestrictToMyDrive(!f.opt.SharedWithMe)
changeList, err = changesCall.Context(ctx).Do()
return f.shouldRetry(ctx, err)
})