Merge pull request #50958 from nextcloud/bugfix/fix-not-found-exception-for-anonymous-users

Fix: NotFoundException for anonymous users
dbg/noid/perms
Konstantin Myakshin 2025-02-24 17:12:04 +07:00 committed by GitHub
commit b9d1dd2dd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

@ -359,7 +359,11 @@ class FileEventsListener implements IEventListener {
}
}
$owner = $node->getOwner()?->getUid();
try {
$owner = $node->getOwner()?->getUid();
} catch (\OCP\Files\NotFoundException) {
$owner = null;
}
// If no owner, extract it from the path.
// e.g. /user/files/foobar.txt