diff --git a/core/lib/Drupal/Core/File/FileSystem.php b/core/lib/Drupal/Core/File/FileSystem.php
index 5947d00c4f0fcacf4acae78af1436dbb45881e62..c82d61fbe351f1553ff0534cb130cc6e44d28abe 100644
--- a/core/lib/Drupal/Core/File/FileSystem.php
+++ b/core/lib/Drupal/Core/File/FileSystem.php
@@ -354,6 +354,10 @@ public function deleteRecursive($path, callable $callback = NULL) {
       call_user_func($callback, $path);
     }
 
+    if (!file_exists($path)) {
+      return TRUE;
+    }
+
     if (is_dir($path)) {
       $dir = dir($path);
       while (($entry = $dir->read()) !== FALSE) {