Fix: NotFoundException for anonymous users

Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
pull/50958/head
Kostiantyn Miakshyn 2025-02-21 18:24:11 +07:00
parent 6cd3046369
commit 9bba153e4f
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