Skip to content

Commit 79c20e7

Browse files
committed
Merge branch 'final' of github.com:PHPSocialNetwork/phpfastcache into final
2 parents f54bcfd + 9b4c90c commit 79c20e7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/phpFastCache/Util/Directory.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ public static function rrmdir($source, $removeOnlyChildren = false)
120120
*/
121121
public static function getAbsolutePath($path)
122122
{
123-
$path = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $path);
124-
$parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');
123+
$parts = preg_split('~[/\\\\]+~', $path, 0, PREG_SPLIT_NO_EMPTY);
125124
$absolutes = [];
126125
foreach ($parts as $part) {
127126
if ('.' === $part) {

0 commit comments

Comments
 (0)