nextcloud / files_lock

GNU Affero General Public License v3.0
25 stars 8 forks source link

file does not get unlocked after being saved in webdav #314

Closed melbruki closed 1 month ago

melbruki commented 4 months ago

Summary: Files do not get unlocked after being saved and closed in WebDAV.

Description: When editing and saving a file via WebDAV, the temporary file locking mechanism in Nextcloud does not release the lock on the file after it has been saved and closed. The lock is only released if the file is opened and closed without saving.

Steps to Reproduce:

Open a file in Nextcloud via a WebDAV client (e.g., Windows File Explorer, Cyberduck). Edit the file and save the changes. Close the file. Attempt to reopen or access the file via Nextcloud or WebDAV. Expected Behavior: The file should be unlocked and accessible after being saved and closed.

Actual Behavior: The file remains locked and is not accessible until manually unlocked or until the lock expires.

susnux commented 1 month ago

Open a file in Nextcloud via a WebDAV client (e.g., Windows File Explorer, Cyberduck). Edit the file and save the changes. Close the file. Attempt to reopen or access the file via Nextcloud or WebDAV. Expected Behavior: The file should be unlocked and accessible after being saved and closed.

The workflow (for WebDAV) is:

  1. LOCK for exclusive write
  2. write changes
  3. UNLOCK

You are missing the UNLOCk - there is no automatic unlock on write for webdav.