diff --git a/composer/Plugin/VendorHardening/VendorHardeningPlugin.php b/composer/Plugin/VendorHardening/VendorHardeningPlugin.php
index a5747168c3e1b81c5cd0809531da2d7318faac43..285e92d2713f840d75a4dd9d8c38bdc2c97401ce 100644
--- a/composer/Plugin/VendorHardening/VendorHardeningPlugin.php
+++ b/composer/Plugin/VendorHardening/VendorHardeningPlugin.php
@@ -347,7 +347,7 @@ protected function cleanPathsForPackage(PackageInterface $package, $paths_for_pa
     $fs = new Filesystem();
     foreach ($paths_for_package as $cleanup_item) {
       $cleanup_path = $package_dir . '/' . $cleanup_item;
-      if (!is_dir($cleanup_path) && !is_file($cleanup_path)) {
+      if (!file_exists($cleanup_path)) {
         // If the package has changed or the --prefer-dist version does not
         // include the directory. This is not an error.
         $this->io->writeError(sprintf("%s<comment>Path '%s' does not exist.</comment>", str_repeat(' ', 6), $cleanup_path), TRUE, IOInterface::VERY_VERBOSE);