Use php_uname() instead of PHP_OS (#283)
parent
3c11cde9fb
commit
571b26a0c3
|
@ -18,7 +18,7 @@ class FileSystemCache implements Cache
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
if (PHP_OS === 'WINNT') {
|
if (strtoupper(substr(php_uname('s'), 0, 3)) === 'WIN') {
|
||||||
$this->cacheDir = getenv('LOCALAPPDATA') . '\\PHP Language Server\\';
|
$this->cacheDir = getenv('LOCALAPPDATA') . '\\PHP Language Server\\';
|
||||||
} else if (getenv('XDG_CACHE_HOME')) {
|
} else if (getenv('XDG_CACHE_HOME')) {
|
||||||
$this->cacheDir = getenv('XDG_CACHE_HOME') . '/phpls/';
|
$this->cacheDir = getenv('XDG_CACHE_HOME') . '/phpls/';
|
||||||
|
|
Loading…
Reference in New Issue