Merge pull request #44247 from nextcloud/backport/43613/stable27

[stable27] fix: fallback from guessing the owner from path in versioning
pull/44284/head
Ferdinand Thiessen 3 months ago committed by GitHub
commit 7773cbbe15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -361,6 +361,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)

Loading…
Cancel
Save