diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 8e96f1a87da8b..96b5c02192375 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -172,7 +172,14 @@ public function remove($files) } } else { if (true !== @unlink($file)) { - throw new IOException(sprintf('Failed to remove file "%s".', $file), 0, null, $file); + // handle broken symlinks on Windows systems + if (is_link($file) && false === @readlink($file)) { + if (true !== @rmdir($file)) { + throw new IOException(sprintf('Failed to remove broken symlink "%s".', $file), 0, null, $file); + } + } else { + throw new IOException(sprintf('Failed to remove file "%s".', $file), 0, null, $file); + } } } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy