Skip to content

Commit

Permalink
fixup! fix: add owner fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
miaulalala committed Dec 12, 2024
1 parent 969a06a commit 5716aba
Showing 1 changed file with 5 additions and 1 deletion.
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 @@ -384,7 +384,7 @@ private function getPathForNode(Node $node): ?string {

$owner = $node->getOwner()?->getUid();

if ($owner !== null) {
if ($owner !== null && $owner !== '') {
$path = $this->rootFolder
->getUserFolder($owner)
->getRelativePath($node->getPath());
Expand All @@ -404,6 +404,10 @@ private function getPathForNode(Node $node): ?string {
$owner = $parts[1];
}

if($owner === '' || $owner === null) {
return null;
}

return $this->rootFolder
->getUserFolder($owner)
->getRelativePath($node->getPath());
Expand Down

0 comments on commit 5716aba

Please sign in to comment.