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 d46eb99 commit df74086Copy full SHA for df74086
1 file changed
src/Service/SymlinkCleaner.php
@@ -100,13 +100,7 @@ public function cleanSymlinks(
100
*/
101
private function isSymlink(string $path): bool
102
{
103
- try {
104
- $stat = $this->fileDriver->stat($path);
105
- } catch (\Exception $e) {
106
- return false;
107
- }
108
-
109
- return (($stat['mode'] ?? 0) & 0120000) === 0120000;
+ return is_link($path);
110
}
111
112
/**
@@ -117,7 +111,8 @@ private function isSymlink(string $path): bool
117
118
private function getBasename(string $path): string
119
113
120
- $trimmed = rtrim($path, '/');
114
+ $normalized = str_replace('\\', '/', $path);
115
+ $trimmed = rtrim($normalized, '/');
121
116
$pos = strrpos($trimmed, '/');
122
if ($pos === false) {
123
return $trimmed;
0 commit comments