We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1d3e74b + 3263de7 commit 666aa63Copy full SHA for 666aa63
1 file changed
apps/files_versions/lib/Listener/FileEventsListener.php
@@ -361,6 +361,16 @@ private function getPathForNode(Node $node): ?string {
361
}
362
363
$owner = $node->getOwner()?->getUid();
364
+
365
+ // If no owner, extract it from the path.
366
+ // e.g. /user/files/foobar.txt
367
+ if (!$owner) {
368
+ $parts = explode('/', $node->getPath(), 4);
369
+ if (count($parts) === 4) {
370
+ $owner = $parts[1];
371
+ }
372
373
374
if ($owner) {
375
$path = $this->rootFolder
376
->getUserFolder($owner)
0 commit comments