Use RX_WINDOWS constant in core and file module

This commit is contained in:
Kijin Sung 2020-02-14 16:16:33 +09:00
parent 76c68c63e0
commit 4ac0a6bf66
4 changed files with 7 additions and 8 deletions

View file

@ -152,7 +152,7 @@ class Storage
public static function isExecutable($path)
{
$path = rtrim($path, '/\\');
if (function_exists('exec') && !starts_with('win', \PHP_OS, false))
if (function_exists('exec') && !\RX_WINDOWS)
{
@exec('/bin/ls -l ' . escapeshellarg($path), $output, $return_var);
if ($return_var === 0)
@ -880,7 +880,7 @@ class Storage
public static function recommendUmask()
{
// On Windows, set the umask to 0000.
if (strncasecmp(\PHP_OS, 'Win', 3) === 0)
if (\RX_WINDOWS)
{
return '0000';
}