diff --git a/src/GlideConversion.php b/src/GlideConversion.php
index <HASH>..<HASH> 100644
--- a/src/GlideConversion.php
+++ b/src/GlideConversion.php
@@ -128,7 +128,7 @@ final class GlideConversion
 
         unlink($this->conversionResult);
 
-        if ($this->directoryIsEmpty($conversionResultDirectory) && $conversionResultDirectory !== sys_get_temp_dir()) {
+        if ($conversionResultDirectory !== sys_get_temp_dir() && $this->directoryIsEmpty($conversionResultDirectory)) {
             rmdir($conversionResultDirectory);
         }
     }
Fix permissions issue (#<I>)