]> source.dussan.org Git - nextcloud-server.git/commitdiff
OC_App::getStorage() failed if app dir didn't exist.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 23 Apr 2012 22:26:33 +0000 (00:26 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 23 Apr 2012 23:44:07 +0000 (01:44 +0200)
lib/app.php

index 9f7d23872f3cfa8abcb0d99ad7a173e8b1e96ef2..2965377525392dcc625b7bc02363fdc6990453e5 100755 (executable)
@@ -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);