From d8f4cd4d5fdf4503748f19d6841970c62a10fb05 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 28 Feb 2023 11:40:05 +0000 Subject: [PATCH] drive: fix change notify picking up files outside the root Before this change, change notify would pick up files which were shared with us as well as file within the drive. When using an encrypted mount this caused errors like: ChangeNotify was unable to decrypt "Plain file name": illegal base32 data at input byte 5 The fix tells drive to restrict changes to the drive in use. Fixes #6771 --- backend/drive/drive.go | 1 + 1 file changed, 1 insertion(+) 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) })