diff -Nuar a/vendor/magento/framework/Filesystem/Driver/File.php b/vendor/magento/framework/Filesystem/Driver/File.php
index 5dcfeeef23ab..e26acb5a9369 100644
--- a/vendor/magento/framework/Filesystem/Driver/File.php
+++ b/vendor/magento/framework/Filesystem/Driver/File.php
@@ -440,11 +440,12 @@ public function symlink($source, $destination, DriverInterface $targetDriver = n
      */
     public function deleteFile($path)
     {
-        $result = @unlink($this->getScheme() . $path);
+        @unlink($this->getScheme() . $path);
         if ($this->stateful) {
             clearstatcache(true, $this->getScheme() . $path);
         }
-        if (!$result) {
+
+        if ($this->isFile($path)) {
             throw new FileSystemException(
                 new Phrase(
                     'The "%1" file can\'t be deleted. %2',
@@ -452,7 +453,7 @@ public function deleteFile($path)
                 )
             );
         }
-        return $result;
+        return true;
     }
 
     /**
