diff --git a/src/GlideConversion.php b/src/GlideConversion.php index 56ddf32e..7df5d6a3 100644 --- a/src/GlideConversion.php +++ b/src/GlideConversion.php @@ -128,7 +128,7 @@ public function save(string $outputFile): void unlink($this->conversionResult); - if ($this->directoryIsEmpty($conversionResultDirectory) && $conversionResultDirectory !== sys_get_temp_dir()) { + if ($conversionResultDirectory !== sys_get_temp_dir() && $this->directoryIsEmpty($conversionResultDirectory)) { rmdir($conversionResultDirectory); } }