From c053429b9c0bbca562a41d25781206951c2660d9 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 27 Sep 2024 14:18:15 +0100 Subject: [PATCH] onedrive: fix time precision for OneDrive personal This reduces the precision advertised by the backend from 1ms to 1s for OneDrive personal accounts. The precision was set to 1ms as part of: 1473de3f040af01c onedrive: add metadata support which was released in v1.66.0. However it appears not all OneDrive personal accounts support 1ms time precision and that Microsoft may be migrating accounts away from this to backends which only support 1s precision. Fixes #8101 --- backend/onedrive/onedrive.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/onedrive/onedrive.go b/backend/onedrive/onedrive.go index 7db269c2f..3ceac3f55 100644 --- a/backend/onedrive/onedrive.go +++ b/backend/onedrive/onedrive.go @@ -1545,9 +1545,12 @@ func (f *Fs) Rmdir(ctx context.Context, dir string) error { // Precision return the precision of this Fs func (f *Fs) Precision() time.Duration { - if f.driveType == driveTypePersonal { - return time.Millisecond - } + // While this is true for some OneDrive personal accounts, it + // isn't true for all of them. See #8101 for details + // + // if f.driveType == driveTypePersonal { + // return time.Millisecond + // } return time.Second }