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:
-rw-r--r--apps/files_encryption/hooks/hooks.php2
-rw-r--r--lib/filesystem.php4
-rw-r--r--lib/ocs/cloud.php2
-rw-r--r--tests/lib/files/cache/updater.php2
-rw-r--r--tests/lib/files/filesystem.php2
5 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 7e4f677ce9d..2731d5a92f7 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -40,7 +40,7 @@ class Hooks {
// Manually initialise Filesystem{} singleton with correct
// fake root path, in order to avoid fatal webdav errors
- \OC\Files\Filesystem::init( $params['uid'] . '/' . 'files' . '/' );
+ \OC\Files\Filesystem::init( $params['uid'], $params['uid'] . '/' . 'files' . '/' );
$view = new \OC_FilesystemView( '/' );
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 57cca902303..e86bea6bff9 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -58,8 +58,8 @@ class OC_Filesystem {
/**
* @deprecated OC_Filesystem is replaced by \OC\Files\Filesystem
*/
- static public function init($root) {
- return \OC\Files\Filesystem::init($root);
+ static public function init($user, $root) {
+ return \OC\Files\Filesystem::init($user, $root);
}
/**
diff --git a/lib/ocs/cloud.php b/lib/ocs/cloud.php
index 179ed8f3107..820d24a8e0c 100644
--- a/lib/ocs/cloud.php
+++ b/lib/ocs/cloud.php
@@ -45,7 +45,7 @@ class OC_OCS_Cloud {
if(OC_User::userExists($parameters['user'])) {
// calculate the disc space
$userDir = '/'.$parameters['user'].'/files';
- \OC\Files\Filesystem::init($useDir);
+ \OC\Files\Filesystem::init($parameters['user'], $userDir);
$rootInfo = \OC\Files\Filesystem::getFileInfo('');
$sharedInfo = \OC\Files\Filesystem::getFileInfo('/Shared');
$used = $rootInfo['size'] - $sharedInfo['size'];
diff --git a/tests/lib/files/cache/updater.php b/tests/lib/files/cache/updater.php
index b83dd0c26e5..7a79f45a203 100644
--- a/tests/lib/files/cache/updater.php
+++ b/tests/lib/files/cache/updater.php
@@ -45,7 +45,7 @@ class Updater extends \PHPUnit_Framework_TestCase {
if (!self::$user) {
if (!\OC\Files\Filesystem::getView()) {
self::$user = uniqid();
- \OC\Files\Filesystem::init('/' . self::$user . '/files');
+ \OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
} else {
self::$user = \OC_User::getUser();
}
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php
index fd116af2d2e..6ce45e6178a 100644
--- a/tests/lib/files/filesystem.php
+++ b/tests/lib/files/filesystem.php
@@ -82,7 +82,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$user = \OC_User::getUser();
}else{
$user=uniqid();
- \OC\Files\Filesystem::init('/'.$user.'/files');
+ \OC\Files\Filesystem::init($user, '/'.$user.'/files');
}
\OC_Hook::clear('OC_Filesystem');
\OC_Hook::connect('OC_Filesystem', 'post_write', $this, 'dummyHook');