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 9435dc0..1d3d226 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);
         }