add bin/pharext.update
[pharext/pharext] / src / pharext / Task / Cleanup.php
index 3684806e62094c91f38a73ae8ad962d4510c7424..14048a52b60c6559863a5f6adc90181a431684a0 100644 (file)
@@ -40,13 +40,13 @@ class Cleanup implements Task
                                RecursiveIteratorIterator::CHILD_FIRST);
                        foreach ($rii as $path => $child) {
                                if ($child->isDir()) {
-                                       rmdir($path);
+                                       @rmdir($path);
                                } else {
-                                       unlink($path);
+                                       @unlink($path);
                                }
                        }
-                       rmdir($this->rm);
-               } else {
+                       @rmdir($this->rm);
+               } elseif (file_exists($this->rm)) {
                        @unlink($this->rm);
                }
        }