Rename and move rewrite a file's Modified time (encrypted instance) #664

Closed
opened 2026-09-23 02:47:14 +00:00 by Cordy · 1 comment
Owner

Found in the #656 QA pass (v0.6.247, files.c0rdyceps.ch, encrypted backend).

Matrix row: §2 "Rename / move / copy".

Steps

  1. Upload qa-small.txt at 02:41 (Modified shows 2026-09-23 02:41).
  2. Rename it to qa-renamed.txt at 02:44. Modified now shows 02:44.
  3. Move it into _qa/sub/ at 02:45. PROPFIND getlastmodified now reports 02:45:34.

Expected: a rename or move changes the name or location, not the content, so the content's Modified time is preserved. That is what users expect from any filesystem, and what WebDAV clients rely on.

Seen: each rename and each move resets Modified to "now". Likely cause: on the encrypted backend, MOVE is implemented as re-write + delete, and the new object inherits the write time.

Consequences

  • "Modified" stops meaning "content last changed". Sorting by modified surfaces files that were only renamed or moved.
  • Sync clients (rclone, the planned desktop engine's ETag/mtime detection) will treat every rename or move as a content change.
  • Also worth checking whether the version history records a new version on rename.

Not yet checked on the unencrypted posix path.

Found in the #656 QA pass (v0.6.247, files.c0rdyceps.ch, encrypted backend). **Matrix row:** §2 "Rename / move / copy". **Steps** 1. Upload `qa-small.txt` at 02:41 (Modified shows 2026-09-23 02:41). 2. Rename it to `qa-renamed.txt` at 02:44. Modified now shows **02:44**. 3. Move it into `_qa/sub/` at 02:45. PROPFIND `getlastmodified` now reports **02:45:34**. **Expected:** a rename or move changes the name or location, not the content, so the content's Modified time is preserved. That is what users expect from any filesystem, and what WebDAV clients rely on. **Seen:** each rename and each move resets Modified to "now". Likely cause: on the encrypted backend, MOVE is implemented as re-write + delete, and the new object inherits the write time. **Consequences** - "Modified" stops meaning "content last changed". Sorting by modified surfaces files that were only renamed or moved. - Sync clients (rclone, the planned desktop engine's ETag/mtime detection) will treat every rename or move as a content change. - Also worth checking whether the version history records a new version on rename. Not yet checked on the unencrypted posix path.
Author
Owner

Same family: trash restore also rewrites mtime. _qa/qa-portrait.png (Modified 2026-09-23 02:41) was deleted and restored at 10:00Z, and it now lists Modified 10:00. (#656 pass)

Same family: **trash restore** also rewrites mtime. `_qa/qa-portrait.png` (Modified 2026-09-23 02:41) was deleted and restored at 10:00Z, and it now lists Modified 10:00. (#656 pass)
Cordy closed this issue 2026-09-23 19:58:59 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#664
No description provided.