fixed delete directories function
This commit is contained in:
parent
ac1b9f84a0
commit
c21726cb3f
1 changed files with 3 additions and 0 deletions
|
@ -296,6 +296,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_directories(&$error, $path, $dry_run = false) {
|
function delete_directories(&$error, $path, $dry_run = false) {
|
||||||
|
if(!file_exists($path))
|
||||||
|
return true;
|
||||||
|
|
||||||
if(strpos(PHP_OS, "Linux") !== false) {
|
if(strpos(PHP_OS, "Linux") !== false) {
|
||||||
$command = "rm -r " . $path;
|
$command = "rm -r " . $path;
|
||||||
} else if(strpos(PHP_OS, "WINNT") !== false) {
|
} else if(strpos(PHP_OS, "WINNT") !== false) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue