]> source.dussan.org Git - nextcloud-server.git/commitdiff
Correct writable check for app dir
authorBrice Maron <brice@bmaron.net>
Thu, 21 Jun 2012 19:35:34 +0000 (19:35 +0000)
committerBrice Maron <brice@bmaron.net>
Thu, 21 Jun 2012 19:35:34 +0000 (19:35 +0000)
lib/util.php

index 8a2d913109dd33ff35599266b0409e48afe03cbe..6cca418a1b50a150dca7b7b744f6e74830f465d3 100755 (executable)
@@ -200,9 +200,11 @@ class OC_Util {
                        $errors[]=array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud");
                }
 
-               // Check if apps folder is writable.
-               if(OC_Config::getValue('writable_appsdir', true) && !is_writable(OC::$SERVERROOT."/apps/")) {
-                       $errors[]=array('error'=>"Can't write into apps directory 'apps'",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud");
+               // Check if there is a writable install folder.
+               if(OC_Config::getValue('appstoreenabled', true)) {
+                       if( OC_App::getInstallPath() === null  || !is_writable(OC_App::getInstallPath())) {
+                               $errors[]=array('error'=>"Can't write into apps directory",'hint'=>"You can usually fix this by giving the webserver user write access to the config directory in owncloud");
+                       }
                }
 
                $CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );