diff --git includes/file.inc includes/file.inc
index 4f7a4c3..c9a10ec 100644
--- includes/file.inc
+++ includes/file.inc
@@ -1305,6 +1305,9 @@ function file_unmanaged_delete($path) {
 function file_unmanaged_delete_recursive($path) {
   // Resolve streamwrapper URI to local path.
   $path = drupal_realpath($path);
+  if ($path === FALSE) {
+    return TRUE;
+  }
   if (is_dir($path)) {
     $dir = dir($path);
     while (($entry = $dir->read()) !== FALSE) {
