mirror of
https://github.com/espocrm/espocrm.git
synced 2026-07-01 08:26:04 +00:00
FileManager: bug fixes
This commit is contained in:
@@ -625,12 +625,19 @@ class Manager
|
||||
$items = (array) $items;
|
||||
}
|
||||
|
||||
$removeList = array();
|
||||
$permissionDeniedList = array();
|
||||
foreach ($items as $item) {
|
||||
if (isset($dirPath)) {
|
||||
$item = Utils\Util::concatPath($dirPath, $item);
|
||||
}
|
||||
|
||||
if (!file_exists($item)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$removeList[] = $item;
|
||||
|
||||
if (!is_writable($item)) {
|
||||
$permissionDeniedList[] = $item;
|
||||
} else if (!is_writable(dirname($item))) {
|
||||
@@ -644,11 +651,7 @@ class Manager
|
||||
}
|
||||
|
||||
$result = true;
|
||||
foreach ($items as $item) {
|
||||
if (isset($dirPath)) {
|
||||
$item = Utils\Util::concatPath($dirPath, $item);
|
||||
}
|
||||
|
||||
foreach ($removeList as $item) {
|
||||
if (is_dir($item)) {
|
||||
$result &= $this->removeInDir($item, true);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user