Skip to content

Commit f54bcfd

Browse files
committed
#381 Fixed getAbsolutePath
return absolute path on *nix system. # Conflicts: # src/phpFastCache/Util/Directory.php
1 parent 77824bc commit f54bcfd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/phpFastCache/Util/Directory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public static function getAbsolutePath($path)
133133
$absolutes[] = $part;
134134
}
135135
}
136-
return implode(DIRECTORY_SEPARATOR, $absolutes);
136+
$prefix = substr(__FILE__, 0, 1) == '/' ? '/' : '';
137+
return $prefix . implode(DIRECTORY_SEPARATOR, $absolutes);
137138
}
138139
}

0 commit comments

Comments
 (0)