summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-04-24 00:26:33 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-04-24 01:44:07 +0200
commit6848b069c9f33a164c8a5ab180a9a7f40802527b (patch)
tree1ad36cd6c97dfa5c2044093ab03d398c7e59549b
parentdfc94cbe84f03d73b59a1e97a745f7f3837c609b (diff)
downloadnextcloud-server-6848b069c9f33a164c8a5ab180a9a7f40802527b.tar.gz
nextcloud-server-6848b069c9f33a164c8a5ab180a9a7f40802527b.zip
OC_App::getStorage() failed if app dir didn't exist.
-rwxr-xr-xlib/app.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/app.php b/lib/app.php
index 9f7d23872f3..29653775253 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -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);