Skip to content

Commit b2f79d8

Browse files
committed
Avoid leading .. for temporary files from Filesystem recursive remove
1 parent e75960b commit b2f79d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Filesystem.php

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

175175
if (file_exists($tmpName)) {
176176
try {

0 commit comments

Comments
 (0)