[stable29] fix(lib): get fileinfo before locking #54266
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #53659
When you try to download files from which at least one has been removed from it's federated source, the
lockFilesmethod will mark the storage as unavailable and lock the file in a stale state preventing any further operations.By getting the fileInfos before, we are able to set-up the mounts before and removing federated shares (mounts) if they are unavailable.
Since 31, the ajax plugin has been removed and the download path have changed, this is only for 29 and 30.
Here is two json stacktrace that show how it used to behave before this patch and how it is supposed to (if you download the file via remote.php/dav, without the zip plugin)
https://gist.github.com/skjnldsv/c8ae6b701f5467984ce0f552e22c5953