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

Fix: NotFoundException for anonymous users
This commit is contained in:
Konstantin Myakshin 2025-02-24 17:12:04 +02:00 committed by GitHub
commit b9d1dd2dd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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