Skip to content
Snippets Groups Projects
Commit 60103d9b authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Only mount shared storage after a user has logged in, fixes shared folder not...

Only mount shared storage after a user has logged in, fixes shared folder not appearing for some WebDAV clients and sync client
parent e5840e1f
Branches
No related tags found
No related merge requests found
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
require_once( 'lib_share.php' ); 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 * 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 { ...@@ -509,6 +507,17 @@ class OC_Filestorage_Shared extends OC_Filestorage {
return $storage->touch($this->getInternalPath($source),$time); 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');
} }
?> ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment