Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-08-01 11:10:49 +0300
committerJulius Härtl <jus@bitgrid.net>2019-08-01 11:10:49 +0300
commite26187c7fff70a7006ba27b8d58622100b8c40c3 (patch)
treec10d56cf73f85195f0d690ab501fa1d92798a5d6 /apps/files_versions
parent3f8f0f76091bf0f0fae7e602f14a3a5f225f111b (diff)
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>
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/lib/Storage.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index c09633be3c1..c42083ff352 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -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);