diff options
author | Brice Maron <brice@bmaron.net> | 2012-06-21 19:35:34 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-06-21 19:35:34 +0000 |
commit | 84b9ac2678e6a0b014b730896a12d1531789d8da (patch) | |
tree | 93862c43af550b6963316989078a1bd8de5819e6 /lib/util.php | |
parent | d22f805b632fad18232d49d638949fe87c2f9183 (diff) | |
download | nextcloud-server-84b9ac2678e6a0b014b730896a12d1531789d8da.tar.gz nextcloud-server-84b9ac2678e6a0b014b730896a12d1531789d8da.zip |
Correct writable check for app dir
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php index 8a2d913109d..6cca418a1b5 100755 --- a/lib/util.php +++ b/lib/util.php @@ -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" ); |