summaryrefslogtreecommitdiffstats
path: root/inc/lib_base.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/lib_base.php')
-rwxr-xr-xinc/lib_base.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/lib_base.php b/inc/lib_base.php
index 536024697d7..6eef3affd40 100755
--- a/inc/lib_base.php
+++ b/inc/lib_base.php
@@ -172,7 +172,7 @@ class OC_UTIL {
}
}
$prems=substr(decoct(fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
- if(substr($CONFIG_DATADIRECTORY_ROOT,2,1)!='0'){
+ if(substr($prems,-1)!='0'){
chmodr($CONFIG_DATADIRECTORY_ROOT,0770);
clearstatcache();
$prems=substr(decoct(fileperms($CONFIG_DATADIRECTORY_ROOT)),-3);
@@ -182,7 +182,7 @@ class OC_UTIL {
}
if($CONFIG_ENABLEBACKUP){
$prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);
- if(substr($CONFIG_BACKUPDIRECTORY,2,1)!='0'){
+ if(substr($prems,-1)!='0'){
chmodr($CONFIG_BACKUPDIRECTORY,0770);
clearstatcache();
$prems=substr(decoct(fileperms($CONFIG_BACKUPDIRECTORY)),-3);