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

main
Jordi Boggiano 3 years ago
parent 8ac5d787b7
commit b01cd459b7
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -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;

Loading…
Cancel
Save