Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix: NotFoundException for anonymous users
Signed-off-by: Kostiantyn Miakshyn <[email protected]>
  • Loading branch information
Koc authored and AndyScherzinger committed Feb 25, 2025
commit 22b3c6cd2e297d6b99e1f74e4a87cbfdb3c18704
6 changes: 5 additions & 1 deletion apps/files_versions/lib/Listener/FileEventsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,11 @@ private function getPathForNode(Node $node): ?string {
}
}

$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
Expand Down
Loading