summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorinPeter <github@florin-peter.de>2013-05-31 11:02:33 -0700
committerFlorinPeter <github@florin-peter.de>2013-05-31 11:02:33 -0700
commit35e83f8fedfe9ca33b2464760eae1d0ccdd5902a (patch)
tree76b0f6ab8abc9b74aeda271afdd71296e9a09316
parentd636e168a6c043ddae730f7cdaaee772b1067793 (diff)
parent1c4c89418bfb42017a61c71d27cc965fbb896793 (diff)
downloadnextcloud-server-35e83f8fedfe9ca33b2464760eae1d0ccdd5902a.tar.gz
nextcloud-server-35e83f8fedfe9ca33b2464760eae1d0ccdd5902a.zip
Merge pull request #3554 from owncloud/files_encryption_fs_loaded_fix
fix login errors while filesystem is not loaded
-rw-r--r--apps/files_encryption/appinfo/app.php6
-rw-r--r--apps/files_encryption/hooks/hooks.php5
2 files changed, 11 insertions, 0 deletions
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php
index d9bb4d5e74e..99bdc2c2470 100644
--- a/apps/files_encryption/appinfo/app.php
+++ b/apps/files_encryption/appinfo/app.php
@@ -25,6 +25,12 @@ stream_wrapper_register('crypt', 'OCA\Encryption\Stream');
// check if we are logged in
if (OCP\User::isLoggedIn()) {
+
+ // ensure filesystem is loaded
+ if(!\OC\Files\Filesystem::$loaded) {
+ \OC_Util::setupFS();
+ }
+
$view = new OC_FilesystemView('/');
$session = new \OCA\Encryption\Session($view);
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index eb9a2600d70..d1b08a0b978 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -46,6 +46,11 @@ class Hooks {
$view = new \OC_FilesystemView('/');
+ // ensure filesystem is loaded
+ if(!\OC\Files\Filesystem::$loaded) {
+ \OC_Util::setupFS($params['uid']);
+ }
+
$util = new Util($view, $params['uid']);
// setup user, if user not ready force relogin