From fc87735f80018e5fa5ca7a7d97ef64552f43a198 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 14 Jul 2026 12:13:34 +0100 Subject: [PATCH] jottacloud: fix incorrect modtime after setting a file's modtime SetModTime kept the caller's full precision modtime in memory while the server stores second precision, so until the object was re-read the modtime did not match what a fresh listing would report. This broke wrappers which compare exact modtimes, such as the hasher backend's fingerprint and the VFS cache. Truncate the modtime to second precision to match what the server stores. --- backend/jottacloud/jottacloud.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/jottacloud/jottacloud.go b/backend/jottacloud/jottacloud.go index d482668ed..aad41a422 100644 --- a/backend/jottacloud/jottacloud.go +++ b/backend/jottacloud/jottacloud.go @@ -1876,8 +1876,10 @@ func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error { return err } - // update local metadata - o.modTime = modTime + // update local metadata - the server stores modtimes with second + // precision so truncate here too to keep the in-memory modtime + // identical to the one a fresh listing returns + o.modTime = modTime.Truncate(time.Second) return nil }