From 6a03d7f91735e4b073d3dc585254c557afeb05f6 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 28 Jun 2024 11:10:31 +0200 Subject: [PATCH] [Filesystem] Fix Filesystem::remove() on Windows --- Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Filesystem.php b/Filesystem.php index 700311d58..958ef178d 100644 --- a/Filesystem.php +++ b/Filesystem.php @@ -173,7 +173,7 @@ private static function doRemove(array $files, bool $isRecursive): void } } elseif (is_dir($file)) { if (!$isRecursive) { - $tmpName = \dirname(realpath($file)).'/.'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-_')); + $tmpName = \dirname(realpath($file)).'/.!'.strrev(strtr(base64_encode(random_bytes(2)), '/=', '-!')); if (file_exists($tmpName)) { try {