mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix: fallback from guessing the owner from path in versioning
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
92e43540ba
commit
3263de77f2
1 changed files with 10 additions and 0 deletions
|
|
@ -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…
Reference in a new issue