Consistent handling of last modified dates when copying/moving files
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Is your feature request related to a problem? Please describe.
Nextcloud handles last-modified metadata inconsistently when copying and moving files and folders:
| Activity | Source | Destination | last modified preserved? v15 | last modified preserved? v16 | last modified preserved? v17 | last modified preserved? v18 | last modified preserved? v19 |
|---|---|---|---|---|---|---|---|
| file upload > 10 MB via browser | Desktop | Primary Storage | ✔️ | ✔️ | ✔️ | ✔️ | |
| file upload < 10 MB via browser | Desktop | Primary Storage | ⛔ | ⛔ | ✔️ | ✔️ | |
| file upload via browser | Desktop | External Storage | ⛔ | ⛔ | ⛔ | ||
| sync files with Desktop client | Desktop | Primary Storage | ✔️ | ✔️ | ✔️ | ✔️ | |
| upload files via WebDAV (@codiflow) | Desktop | Primary Storage | ⛔ | ⛔ | ⛔ | ⛔ | |
| download files via WebDAV | Primary Storage | Desktop | ✔️ | ⛔ | |||
| upload files via rclone | Desktop | Primary Storage | ✔️ | ✔️ | ✔️ | ||
| upload files via rclone | Desktop | External Storage | ⛔ | ⛔ | |||
| moving files and folders within nextcloud | Primary Storage | Primary Storage | ✔️ | ✔️ | ✔️ | ✔️ | |
| moving files and folders within nextcloud | Primary Storage | External Storage | ⛔ | ⛔ | ⛔ | ||
| moving files and folders within nextcloud | External Storage | Primary Storage | ⛔ | ⛔ | ⛔ | ||
| copy files and folders within nextcloud | Any Storage | Any Storage | ⛔ | ⛔ | ⛔ | ⛔ | |
| copying files via cloud federation | remote nextcloud | local nextcloud | ⛔ | ⛔ | |||
| upload via file drop | Desktop | primary storage | ⛔ | ⛔ | ⛔ |
(Primary storage refers to object storage directly managed by nextcloud, External Storage refers to externally mounted object storage.)
Describe the solution you'd like
Last-modification metadata should always be preserved, no matter where files and folders are coming from or moving to.
Describe alternatives you've considered
This should just work 😉
Additional context
For my use case, the last modification date of files and folders is critical for comparing different versions of the same item at different locations. It also is important when moving files from active usage into an archival storage (nearline bucket mounted externally).
(related #15177, #14982)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by mapping the copy, move, upload, download, and federation paths represented in the table, then read related issues #15177 and #14982. Done means last-modified metadata is preserved for every listed source and destination combination, including external storage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100