do not try to delete if file does not exist
authorChristian Weiske <cweiske@cweiske.de>
Fri, 28 Sep 2012 10:58:39 +0000 (12:58 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 28 Sep 2012 10:58:39 +0000 (12:58 +0200)
src/phorkie/Tools.php

index 9435dc047d560624036e464ccf76851c5b49ad2c..1d3d2260ebc8aaa27af0ac06aa753f68977f3d45 100644 (file)
@@ -13,6 +13,9 @@ class Tools
      */
     public static function recursiveDelete($path)
     {
+        if (!file_exists($path)) {
+            return true;
+        }
         if (!is_dir($path) || is_link($path)) {
             return unlink($path);
         }