-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(files_versions): only handle path updates when there is path #51609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
80dae1b to
bae9db5
Compare
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
|
Shouldn't this PR be backported to stable30 and stable31, or was there a reason for not doing so? |
|
/backport to stable31 |
|
/backport to stable30 |
Because waiting to also include #53276 |
| $user = $this->userSession->getUser()?->getUID(); | ||
| if ($user === null) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this completely disables files_version event listeners when files are moved with occ, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See old code: It needs a user anyways \OC_User::getUser() for the view otherwise it fails
Summary
getPathForNodecan fail with null for various reasons (e.g. no owner), in this cases we need to just skip the event handling.Checklist