Browse Source

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>
tags/v17.0.0beta1
Julius Härtl 4 years ago
parent
commit
e26187c7ff
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      apps/files_versions/lib/Storage.php

+ 1
- 1
apps/files_versions/lib/Storage.php View File

@@ -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…
Cancel
Save