fix(files_versions): only handle path updates when there is path#51609
Merged
AndyScherzinger merged 1 commit intomasterfrom Apr 27, 2025
Merged
fix(files_versions): only handle path updates when there is path#51609AndyScherzinger merged 1 commit intomasterfrom
AndyScherzinger merged 1 commit intomasterfrom
Conversation
solracsf
approved these changes
Mar 21, 2025
come-nc
reviewed
Mar 24, 2025
80dae1b to
bae9db5
Compare
susnux
commented
Apr 22, 2025
come-nc
approved these changes
Apr 22, 2025
8ce3d91 to
b710a81
Compare
3b1718c to
198261c
Compare
`getPathForNode` can fail with null for various reasons (e.g. no owner), in this cases we need to just skip the event handling. Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
198261c to
8ca23f2
Compare
4 tasks
Contributor
|
Shouldn't this PR be backported to stable30 and stable31, or was there a reason for not doing so? |
Contributor
|
/backport to stable31 |
Contributor
|
/backport to stable30 |
This was referenced Jun 16, 2025
Contributor
Author
Because waiting to also include #53276 |
come-nc
reviewed
Jun 17, 2025
Comment on lines
+342
to
+345
| $user = $this->userSession->getUser()?->getUID(); | ||
| if ($user === null) { | ||
| return; | ||
| } |
Contributor
There was a problem hiding this comment.
Actually, this completely disables files_version event listeners when files are moved with occ, no?
Contributor
Author
There was a problem hiding this comment.
See old code: It needs a user anyways \OC_User::getUser() for the view otherwise it fails
Merged
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.
Summary
getPathForNodecan fail with null for various reasons (e.g. no owner), in this cases we need to just skip the event handling.Checklist