1
0
mirror of https://github.com/rclone/rclone.git synced 2025-08-10 06:09:44 +02:00
Files
rclone/backend
nielash 2a587d21c4 azurefiles: fix hash getting erased when modtime is set
Before this change, setting an object's modtime with o.SetModTime() (without
updating the file's content) would inadvertently erase its md5 hash.

The documentation notes: "If this property isn't specified on the request, the
property is cleared for the file. Subsequent calls to Get File Properties won't
return this property, unless it's explicitly set on the file again."
https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-properties#common-request-headers

This change fixes the issue by setting ContentMD5 (and ContentType), to the
extent we have it, during SetModTime.

Discovered on bisync integration tests such as TestBisyncRemoteRemote/resolve
2025-08-09 18:12:17 -04:00
..
2025-06-06 15:15:07 +01:00
2025-07-01 17:36:07 +01:00
2025-06-12 18:31:01 +01:00
2025-04-08 15:14:09 +01:00
2025-06-05 16:40:54 +01:00
2025-02-28 11:31:14 +00:00
2025-06-06 15:15:07 +01:00
2025-02-28 11:31:14 +00:00
2025-04-08 15:14:09 +01:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2024-08-12 13:35:44 +01:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00