Skip to content

fix(upload): refresh lock metadata after uploading files - #18046

Open
xO-ox-ai wants to merge 1 commit into
nextcloud:masterfrom
xO-ox-ai:fix/upload-lock-metadata
Open

xO-ox-ai wants to merge 1 commit into
nextcloud:masterfrom
xO-ox-ai:fix/upload-lock-metadata

Conversation

@xO-ox-ai

@xO-ox-ai xO-ox-ai commented Nov 13, 2026 •

Copy link
Copy Markdown

After an upload, the final PROPFIND updates the cached remote file ID but leaves its previous ordinary file lock metadata in place. Refresh the lock flag, owner, type, timestamps and token from that same response, including clearing cached fields when the server reports the file as unlocked.

Regression tests cover unchanged and replaced remote IDs, a current lock owned by another editor, an unlocked response, and preservation of local file identity and storage paths. This change does not alter E2EE directory tokens or upload request headers.

Validation:

  • Both new regression tests fail against the original implementation and pass with this change.
  • Six selected Gplay unit tests pass, including the existing remote-property update test and OCFile tests.
  • Gplay debug APK builds; lintGplayDebug, detekt and spotlessKotlinCheck pass.
  • Running the configured SpotBugs engine and plugins through an argument file on the changed class reports the same two existing CE_CLASS_ENVY findings as the unmodified implementation, in createNewOCFile and obtainNewOCFileToUpload; no new findings.

AI assistance: Codex (GPT-6) assisted with implementation, regression tests and validation. The contributor authorized the DCO sign-off.

Read ordinary file lock metadata from the final remote properties together with the remote file ID. Clear obsolete cached locks when the server reports an unlocked file and retain current remote lock ownership.

Assisted-by: Codex:GPT-6
Signed-off-by: Li Wei <caeser222000@sohu.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant