Fix to use proper mtime for OC-Mtime header

This commit is contained in:
Klaas Freitag 2024-12-17 15:34:24 +01:00
parent 421f90307c
commit bc39e5bdfa
1 changed files with 1 additions and 1 deletions

View File

@ -1530,7 +1530,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", src.ModTime(ctx).Unix())
extraHeaders["X-OC-Mtime"] = fmt.Sprintf("%d", o.modTime.Unix())
}
// Set one upload checksum
// Owncloud uses one checksum only to check the upload and stores its own SHA1 and MD5