[stable29] fix(lib): get fileinfo before locking#54266
Merged
AndyScherzinger merged 1 commit intostable29from Aug 20, 2025
Merged
[stable29] fix(lib): get fileinfo before locking#54266AndyScherzinger merged 1 commit intostable29from
AndyScherzinger merged 1 commit intostable29from
Conversation
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Member
Author
|
/backport! to stable30 |
Member
|
This could lead to a race condition if the size of any of the files changes between collecting the fileinfos and the moved lock call. Not sure that the effect would be though |
Member
Author
That's the easier approach I could find that made sense to me. |
8 tasks
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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