* finish task #41678.

This commit is contained in:
王怡栋
2021-08-25 09:39:26 +08:00
parent 452aaac4d7
commit 7ce3823a9c
3 changed files with 6 additions and 5 deletions
+4 -3
View File
@@ -1050,10 +1050,11 @@ class upgradeModel extends model
$fullPath = $basePath . str_replace('/', DIRECTORY_SEPARATOR, $file);
if(file_exists($fullPath))
{
if((is_dir($fullPath) and !$zfile->removeDir($fullPath)) or
(is_file($fullPath) and !$zfile->removeFile($fullPath)))
$isDir = is_dir($fullPath);
if(($isDir and !$zfile->removeDir($fullPath)) or
(!$isDir and !$zfile->removeFile($fullPath)))
{
$result[] = $fullPath;
$result[] = 'rm -f ' . ($isDir ? '-r ' : '') . $fullPath;
}
}
}