[BUG] File locking causes infinite request sending
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 251
- Forks
- 142
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 3
Description
In a 10.5 server, enable file locking. This can be done with the following occ command:
occ config:app:set files enable_lock_file_action --value yes
Then, files in web UI will have a lock option that avoids the file to be displaced (moved, removed, renamed):

Once it is locked, a lock icon appears in the cell:

now, let's move to iOS
Steps to reproduce
- In server, lock a file following instructions above
- In iOS app, rename/move the file
Actual behaviour
This is not posible because file is locked. Server returns 423
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\Locked</s:exception>
<s:message/>
<d:lock-token-submitted>
<d:href>files/user1/ownCloud Manual.pdf</d:href>
</d:lock-token-submitted>
</d:error>
Expected behaviour
If the file is locked, it is not posible to rename/move it. It should show an error and the file is not renamed/moved.
In case of deletion of a locked file, there is no endless loop. Error is shown, but, it could be more friendly:

iOS 13.6, iPhoneXR
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
Reproduce the issue by locking a server file, then attempting to rename or move it in the iOS app. Trace the rename/move request handling and the server's 423 response; done means the operation stops without repeated requests and presents an error to the user. No source file or test is identified in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100