Commit 0ed9dcdfb26d32ee539787304ed718033990c711

Authored by Yarik
1 parent a0729820

Initializer fix

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
@@ -439,18 +439,18 @@ @@ -439,18 +439,18 @@
439 $root = $this->getRoot(); 439 $root = $this->getRoot();
440 foreach ($paths as $writable) { 440 foreach ($paths as $writable) {
441 $fullPath = "$root/$writable"; 441 $fullPath = "$root/$writable";
442 - if (is_dir($fullPath)) { 442 + if (is_dir($fullPath) || is_file($fullPath)) {
443 if (@chmod($fullPath, 0777)) { 443 if (@chmod($fullPath, 0777)) {
444 echo $this->formatMessage( 444 echo $this->formatMessage(
445 " ***** Set writable $writable (chmod 0777)", 445 " ***** Set writable $writable (chmod 0777)",
446 [ 'fg-yellow' ] 446 [ 'fg-yellow' ]
447 ) . "\n"; 447 ) . "\n";
448 } else { 448 } else {
449 - $this->printError("Operation chmod not permitted for directory $writable."); 449 + $this->printError("Operation chmod not permitted for directory or file $writable.");
450 } 450 }
451 } else { 451 } else {
452 if (!@mkdir($fullPath, 0777, true)) { 452 if (!@mkdir($fullPath, 0777, true)) {
453 - $this->printError("Directory $writable does not exist and cannot be created."); 453 + $this->printError("Directory or file $writable does not exist and cannot be created.");
454 } 454 }
455 } 455 }
456 } 456 }