8000 bug #57574 [Filesystem] Fix Filesystem::remove() on Windows (nicolas-… · symfony/symfony@572ce41 · GitHub
[go: up one dir, main page]

Skip to content

Commit 572ce41

Browse files
bug #57574 [Filesystem] Fix Filesystem::remove() on Windows (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- [Filesystem] Fix Filesystem::remove() on Windows | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | #57375, #57346 | License | MIT Let's experiment with `@smnandre`'s theory. Commits ------- 2b50dea [Filesystem] Fix Filesystem::remove() on Windows
2 parents d4de180 + 2b50dea commit 572ce41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Filesystem/Filesystem.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private static function doRemove(array $files, bool $isRecursive): void
173173
}
174174
} elseif (is_dir($file)) {
175175
if (!$isRecursive) {
176-
$tmpName = \dirname(realpath($file)).'/.'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-_'));
176+
$tmpName = \dirname(realpath($file)).'/.!'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-!'));
177177

178178
if (file_exists($tmpName)) {
179179
try {

0 commit comments

Comments
 (0)
0