Skip to content
Snippets Groups Projects
Commit 6848b069 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

OC_App::getStorage() failed if app dir didn't exist.

parent dfc94cbe
Branches
No related tags found
No related merge requests found
......@@ -519,6 +519,10 @@ class OC_App{
public static function getStorage($appid){
if(OC_App::isEnabled($appid)){//sanity check
if(OC_User::isLoggedIn()){
$view = new OC_FilesystemView('/'.OC_User::getUser());
if(!$view->file_exists($appid)) {
$view->mkdir($appid);
}
return new OC_FilesystemView('/'.OC_User::getUser().'/'.$appid);
}else{
OC_Log::write('core','Can\'t get app storage, app, user not logged in',OC_Log::ERROR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment