From 90386efeb16053b4b8446f46bd7e21b25b05789e Mon Sep 17 00:00:00 2001 From: WeidiDeng Date: Thu, 3 Jul 2025 16:42:15 +0800 Subject: [PATCH] webdav: fix setting modtime to that of local object instead of remote In this commit the source of the modtime got changed to the wrong object by accident 0b9671313b14ffe8 webdav: add an ownCloud Infinite Scale vendor that enables tus chunked upload support This reverts that change and fixes the integration tests. --- backend/webdav/webdav.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go index b707116bb..46a91ad01 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go @@ -1550,7 +1550,7 @@ func (o *Object) extraHeaders(ctx context.Context, src fs.ObjectInfo) map[string extraHeaders := map[string]string{} if o.fs.useOCMtime || o.fs.hasOCMD5 || o.fs.hasOCSHA1 { if o.fs.useOCMtime { - extraHeaders["X-OC-Mtime"] = fmt.Sprintf("%d", o.modTime.Unix()) + extraHeaders["X-OC-Mtime"] = fmt.Sprintf("%d", src.ModTime(ctx).Unix()) } // Set one upload checksum // Owncloud uses one checksum only to check the upload and stores its own SHA1 and MD5