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 77c9238892
commit 03605133d8

View file

@ -382,7 +382,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