nextcloud / nextcloud/server

Consistent handling of last modified dates when copying/moving files

Open
#15,192 62 comments 40 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: external storage feature: filesystem hotspot: file time handling overview technical debt
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.