Merge remote branch 'upstream/master' into BUG-9510

This commit is contained in:
Brayan Osmar Pereyra Suxo
2012-08-08 11:15:00 -04:00
24 changed files with 605 additions and 245 deletions

View File

@@ -563,14 +563,21 @@ class G
}
if (is_dir($dirName)) {
foreach(glob($dirName . '/*') as $file) {
foreach(glob($dirName . '/{,.}*', GLOB_BRACE) as $file) {
if ( $file == $dirName . '/.' || $file == $dirName . '/..') {
continue;
}
if(is_dir($file)) {
G::rm_dir($file);
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
exec('DEL /F /S /Q %' . $dirName . '%', $res);
else
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$dirNameWin = str_replace('/','\\' ,$dirName);
exec('DEL /F /S /Q ' . $dirNameWin . '', $res);
exec('RD /S /Q ' . $dirNameWin . '', $res);
} else {
@rmdir($file);
}
}
else {
@unlink($file);