1
0
Fork 0

Avoid checking if dir is empty if it does not even exist

pull/9959/head
Jordi Boggiano 2021-06-07 16:41:11 +02:00
parent 8ac5d787b7
commit b01cd459b7
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 2 deletions

View File

@ -139,8 +139,7 @@ abstract class ArchiveDownloader extends FileDownloader
$renameAsOne = false;
if (!file_exists($path)) {
$renameAsOne = true;
}
if ($filesystem->isDirEmpty($path)) {
} elseif ($filesystem->isDirEmpty($path)) {
try {
if ($filesystem->removeDirectoryPhp($path)) {
$renameAsOne = true;