diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index c09633be3c..c42083ff35 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);