mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Make sure we only fetch the file by id for the actual owner
Otherwise this will fetch all mounts for the file id which is quite expensive and causes long saving times in big sharing structures Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
fbf3a189a1
commit
516da1f5a2
1 changed files with 1 additions and 1 deletions
|
|
@ -183,7 +183,7 @@ class Storage {
|
|||
$eventDispatcher = \OC::$server->getEventDispatcher();
|
||||
$fileInfo = $files_view->getFileInfo($filename);
|
||||
$id = $fileInfo->getId();
|
||||
$nodes = \OC::$server->getRootFolder()->getById($id);
|
||||
$nodes = \OC::$server->getRootFolder()->getUserFolder($uid)->getById($id);
|
||||
foreach ($nodes as $node) {
|
||||
$event = new CreateVersionEvent($node);
|
||||
$eventDispatcher->dispatch('OCA\Files_Versions::createVersion', $event);
|
||||
|
|
|
|||
Loading…
Reference in a new issue