onedrive: disable change notify in China region since it is not supported

Fixes #6444
This commit is contained in:
Nick Craig-Wood 2022-09-15 17:18:35 +01:00
parent 04b54bbb1e
commit 1c99661d8c
1 changed files with 6 additions and 0 deletions

View File

@ -891,6 +891,12 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
}).Fill(ctx, f)
f.srv.SetErrorHandler(errorHandler)
// Disable change polling in China region
// See: https://github.com/rclone/rclone/issues/6444
if f.opt.Region == regionCN {
f.features.ChangeNotify = nil
}
// Renew the token in the background
f.tokenRenewer = oauthutil.NewRenew(f.String(), ts, func() error {
_, _, err := f.readMetaDataForPath(ctx, "")