Avoid checking if dir is empty if it does not even exist
parent
8ac5d787b7
commit
b01cd459b7
|
@ -139,8 +139,7 @@ abstract class ArchiveDownloader extends FileDownloader
|
||||||
$renameAsOne = false;
|
$renameAsOne = false;
|
||||||
if (!file_exists($path)) {
|
if (!file_exists($path)) {
|
||||||
$renameAsOne = true;
|
$renameAsOne = true;
|
||||||
}
|
} elseif ($filesystem->isDirEmpty($path)) {
|
||||||
if ($filesystem->isDirEmpty($path)) {
|
|
||||||
try {
|
try {
|
||||||
if ($filesystem->removeDirectoryPhp($path)) {
|
if ($filesystem->removeDirectoryPhp($path)) {
|
||||||
$renameAsOne = true;
|
$renameAsOne = true;
|
||||||
|
|
Loading…
Reference in New Issue