Fix detection of Windows-based server environments

This commit is contained in:
Daniel Rudolf 2017-02-19 21:53:29 +01:00
parent d9393df4fa
commit a2d0d745ff
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538
2 changed files with 2 additions and 1 deletions

View file

@ -7,6 +7,7 @@ Released: -
```
* [Changed] Improve documentation
* [Fixed] Improve hostname detection with proxies
* [Fixed] Fix detection of Windows-based server environments
```
### Version 1.0.4

View file

@ -1371,7 +1371,7 @@ class Pico
*/
public function getAbsolutePath($path)
{
if (strncasecmp(PHP_OS, 'WIN', 3) === 0) {
if (DIRECTORY_SEPARATOR === '\\') {
if (preg_match('/^([a-zA-Z]:\\\\|\\\\\\\\)/', $path) !== 1) {
$path = $this->getRootDir() . $path;
}