Only mount shared storage after a user has logged in, fixes shared folder not appearing for some WebDAV clients and sync client

This commit is contained in:
Michael Gapczynski 2012-05-10 19:56:25 -04:00
parent e5840e1fe2
commit 60103d9b94
1 changed files with 11 additions and 2 deletions

View File

@ -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');
}
?>