summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-05-10 19:56:25 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-05-10 19:56:41 -0400
commit60103d9b94703255d2700f6f9fbfd2f606be7d7f (patch)
tree7c8e567e8ea85c5234f31c8a2cc7c1bac90e6682 /apps/files_sharing
parente5840e1fe27bbeec8ce4894c70c50d5c9b787982 (diff)
downloadnextcloud-server-60103d9b94703255d2700f6f9fbfd2f606be7d7f.tar.gz
nextcloud-server-60103d9b94703255d2700f6f9fbfd2f606be7d7f.zip
Only mount shared storage after a user has logged in, fixes shared folder not appearing for some WebDAV clients and sync client
Diffstat (limited to 'apps/files_sharing')
-rwxr-xr-xapps/files_sharing/sharedstorage.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php
index f9923dcfe90..3bb6e73035e 100755
--- a/apps/files_sharing/sharedstorage.php
+++ b/apps/files_sharing/sharedstorage.php
@@ -22,8 +22,6 @@
require_once( 'lib_share.php' );
-OC_Filesystem::mount('OC_Filestorage_Shared',array('datadir'=>'/'.OCP\USER::getUser().'/files/Shared'),'/'.OCP\USER::getUser().'/files/Shared/');
-
/**
* Convert target path to source path and pass the function call to the correct storage provider
*/
@@ -509,6 +507,17 @@ class OC_Filestorage_Shared extends OC_Filestorage {
return $storage->touch($this->getInternalPath($source),$time);
}
}
+
+ public static function setup() {
+ OC_Filesystem::mount('OC_Filestorage_Shared', array('datadir' => '/'.OCP\USER::getUser().'/files/Shared'), '/'.OCP\USER::getUser().'/files/Shared/');
+ }
+
+}
+
+if (OCP\USER::isLoggedIn()) {
+ OC_Filestorage_Shared::setup();
+} else {
+ OCP\Util::connectHook('OC_User', 'post_login', 'OC_Filestorage_Shared', 'setup');
}
?>