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
11109c6dfa
commit
53bb2862f0
|
@ -183,7 +183,7 @@ class Storage {
|
||||||
$eventDispatcher = \OC::$server->getEventDispatcher();
|
$eventDispatcher = \OC::$server->getEventDispatcher();
|
||||||
$fileInfo = $files_view->getFileInfo($filename);
|
$fileInfo = $files_view->getFileInfo($filename);
|
||||||
$id = $fileInfo->getId();
|
$id = $fileInfo->getId();
|
||||||
$nodes = \OC::$server->getRootFolder()->getById($id);
|
$nodes = \OC::$server->getRootFolder()->getUserFolder($uid)->getById($id);
|
||||||
foreach ($nodes as $node) {
|
foreach ($nodes as $node) {
|
||||||
$event = new CreateVersionEvent($node);
|
$event = new CreateVersionEvent($node);
|
||||||
$eventDispatcher->dispatch('OCA\Files_Versions::createVersion', $event);
|
$eventDispatcher->dispatch('OCA\Files_Versions::createVersion', $event);
|
||||||
|
|
Loading…
Reference in New Issue