From 571b26a0c38c17c9501b4338c2490b0142d3a39e Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Mon, 6 Feb 2017 16:42:45 +0100 Subject: [PATCH] Use php_uname() instead of PHP_OS (#283) --- src/Cache/FileSystemCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cache/FileSystemCache.php b/src/Cache/FileSystemCache.php index 8a507f7..5e9f523 100644 --- a/src/Cache/FileSystemCache.php +++ b/src/Cache/FileSystemCache.php @@ -18,7 +18,7 @@ class FileSystemCache implements Cache public function __construct() { - if (PHP_OS === 'WINNT') { + if (strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') { $this->cacheDir = getenv('LOCALAPPDATA') . '\\PHP Language Server\\'; } else if (getenv('XDG_CACHE_HOME')) { $this->cacheDir = getenv('XDG_CACHE_HOME') . '/phpls/';