Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

webdav: fix setting modtime to that of local object instead of remote

WeidiDeng224ca0ae8efd
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