diff options
author | Andrey Andreev <narf@bofh.bg> | 2011-10-04 17:27:32 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2011-10-04 17:27:32 +0200 |
commit | 8b3cf634d94cdd8a11b1f1fcec69bdc2a0f5e71b (patch) | |
tree | 366595a0525452c5b7622efbf8f875cfe590f355 /system/libraries | |
parent | f7bdd0fc3324db3085a62b3c1f1ebb751053c429 (diff) |
Change Windows OS detection approach
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Upload.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index fc3de0329..045283f96 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1054,7 +1054,7 @@ class CI_Upload { * - a 'W' in the substr() expression bellow, would mean that we're using Windows * - many system admins would disable the exec() function due to security concerns, hence the function_exists() check */ - if (substr(PHP_OS, 0, 1) !== 'W' && function_exists('exec')) + if (DIRECTORY_SEPARATOR !== '\\' && function_exists('exec')) { $output = array(); @exec('file --brief --mime-type ' . escapeshellarg($file['tmp_path']), $output, $return_code); |