Commit 0ed9dcdfb26d32ee539787304ed718033990c711
1 parent
a0729820
Initializer fix
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
Initializer.php
| ... | ... | @@ -439,18 +439,18 @@ |
| 439 | 439 | $root = $this->getRoot(); |
| 440 | 440 | foreach ($paths as $writable) { |
| 441 | 441 | $fullPath = "$root/$writable"; |
| 442 | - if (is_dir($fullPath)) { | |
| 442 | + if (is_dir($fullPath) || is_file($fullPath)) { | |
| 443 | 443 | if (@chmod($fullPath, 0777)) { |
| 444 | 444 | echo $this->formatMessage( |
| 445 | 445 | " ***** Set writable $writable (chmod 0777)", |
| 446 | 446 | [ 'fg-yellow' ] |
| 447 | 447 | ) . "\n"; |
| 448 | 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 | 451 | } else { |
| 452 | 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 | } | ... | ... |