diff --git a/includes/file.inc b/includes/file.inc
index 4f7a4c3..a171da4 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -1261,7 +1261,9 @@ function file_delete(stdClass $file, $force = FALSE) {
  */
 function file_unmanaged_delete($path) {
   // Resolve streamwrapper URI to local path.
-  $path = drupal_realpath($path);
+  if (empty($path = drupal_realpath($path))) {
+    return TRUE;
+  }
   if (is_dir($path)) {
     watchdog('file', '%path is a directory and cannot be removed using file_unmanaged_delete().', array('%path' => $path), WATCHDOG_ERROR);
     return FALSE;
@@ -1304,7 +1306,9 @@ function file_unmanaged_delete($path) {
  */
 function file_unmanaged_delete_recursive($path) {
   // Resolve streamwrapper URI to local path.
-  $path = drupal_realpath($path);
+  if (empty($path = drupal_realpath($path))) {
+    return TRUE;
+  }
   if (is_dir($path)) {
     $dir = dir($path);
     while (($entry = $dir->read()) !== FALSE) {
