Skip to content

[stable35] fix(locks): let users delete, rename and move files nobody else is editing - #9702

Merged
mejo- merged 1 commit into
stable35from
backport/9696/stable35
Nov 26, 2026
Merged

mejo- merged 1 commit into
stable35from
backport/9696/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 26, 2026

Copy link
Copy Markdown

Backport of PR #9696

@backportbot
backportbot Bot requested a review from blizzz November 26, 2026 08:10
@backportbot backportbot Bot added bug Something isn't working 3. to review AI assisted This PR contains AI-assisted commits labels Nov 26, 2026
@backportbot backportbot Bot added this to the Nextcloud 35.0.4 milestone Nov 26, 2026
@mejo-
mejo- enabled auto-merge November 26, 2026 08:11
@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/services/SyncService.ts 90.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

…iting

Text locks a file while it is edited, and the lock belongs to no user.
Deleting, renaming or moving the file over WebDAV therefore failed with
423 Locked, also for the only person editing it, for example when
deleting it from the editor's own menu in the Viewer.

These requests now pass the lock check, unless someone else is editing
the file right now. Text releases its lock only right before the file
is deleted or renamed, so a request that fails for another reason keeps
the file locked. So does a share recipient removing, renaming or moving
the share, which leaves the owner's file in place. After a rename or
move the next change locks the file again.

When Files reports the file as deleted, which it also does for a move,
the editor asks the server whether its session went with the file. Only
then does it drop the session instead of trying to save, so a delete no
longer reports an expired session and a move keeps the changes.

Renaming to or from Markdown stays blocked while the file is edited,
as Text then discards the changes that are not saved yet. So does
overwriting an edited file with a copy or move.

Fixes: #9310

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo-
mejo- force-pushed the backport/9696/stable35 branch from d1df711 to acd3137 Compare November 26, 2026 08:47
@mejo-
mejo- merged commit 29a4630 into stable35 Nov 26, 2026
70 checks passed
@mejo-
mejo- deleted the backport/9696/stable35 branch November 26, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant