Merge pull request #43613 from nextcloud/version-owner-fallback

This commit is contained in:
John Molakvoæ 2024-03-16 13:23:06 +01:00 committed by GitHub
commit 2ff172004a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -362,6 +362,16 @@ class FileEventsListener implements IEventListener {
}
$owner = $node->getOwner()?->getUid();
// If no owner, extract it from the path.
// e.g. /user/files/foobar.txt
if (!$owner) {
$parts = explode('/', $node->getPath(), 4);
if (count($parts) === 4) {
$owner = $parts[1];
}
}
if ($owner) {
$path = $this->rootFolder
->getUserFolder($owner)