Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b58828 commit fc3ebb8Copy full SHA for fc3ebb8
src/Symfony/Component/Filesystem/Filesystem.php
@@ -94,12 +94,15 @@ public function remove($files)
94
95
if (is_dir($file) && !is_link($file)) {
96
$this->remove(new \FilesystemIterator($file));
97
- rmdir($file);
98
- } elseif(is_dir($file) && is_link($file)) {
99
- // https://bugs.php.net/bug.php?id=52176 windows thinks symlinks are directories
+
100
rmdir($file);
101
} else {
102
- unlink($file);
+ // https://bugs.php.net/bug.php?id=52176
+ if (defined('PHP_WINDOWS_VERSION_MAJOR') && is_dir($file)) {
+ rmdir($file);
103
+ } else {
104
+ unlink($file);
105
+ }
106
}
107
108
0 commit comments