Fix: NotFoundException for anonymous users

Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
This commit is contained in:
Kostiantyn Miakshyn 2025-02-21 18:24:11 +01:00 committed by backportbot[bot]
parent c4467ba1e4
commit 3012a87bac

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