summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-07-08 15:55:17 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-07-08 15:55:17 +0200
commitc2d88a08b796ca19c8b5ec63bfd34ac32ead4208 (patch)
treef18e0ba4d05361456a6712378ccc0784620c1e9c /lib/private/legacy
parent48f9e4ed03f3148d62919a95496ee43164d3e707 (diff)
downloadnextcloud-server-c2d88a08b796ca19c8b5ec63bfd34ac32ead4208.tar.gz
nextcloud-server-c2d88a08b796ca19c8b5ec63bfd34ac32ead4208.zip
Remove unneeded checks if it runs on a Windows machine
* the setup check is still there
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/helper.php2
-rw-r--r--lib/private/legacy/util.php33
2 files changed, 13 insertions, 22 deletions
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php
index 21fb3cbc5ab..06cffe80837 100644
--- a/lib/private/legacy/helper.php
+++ b/lib/private/legacy/helper.php
@@ -534,7 +534,7 @@ class OC_Helper {
return $memcache->get($program);
}
$result = null;
- if (!\OC_Util::runningOnWindows() && self::is_function_enabled('exec')) {
+ if (self::is_function_enabled('exec')) {
$exeSniffer = new ExecutableFinder();
// Returns null if nothing is found
$result = $exeSniffer->find($program);
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index 3c56008a48b..2a876eda4d0 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -902,22 +902,18 @@ class OC_Util {
public static function checkDataDirectoryPermissions($dataDirectory) {
$l = \OC::$server->getL10N('lib');
$errors = array();
- if (self::runningOnWindows()) {
- //TODO: permissions checks for windows hosts
- } else {
- $permissionsModHint = $l->t('Please change the permissions to 0770 so that the directory'
- . ' cannot be listed by other users.');
+ $permissionsModHint = $l->t('Please change the permissions to 0770 so that the directory'
+ . ' cannot be listed by other users.');
+ $perms = substr(decoct(@fileperms($dataDirectory)), -3);
+ if (substr($perms, -1) != '0') {
+ chmod($dataDirectory, 0770);
+ clearstatcache();
$perms = substr(decoct(@fileperms($dataDirectory)), -3);
- if (substr($perms, -1) != '0') {
- chmod($dataDirectory, 0770);
- clearstatcache();
- $perms = substr(decoct(@fileperms($dataDirectory)), -3);
- if (substr($perms, 2, 1) != '0') {
- $errors[] = array(
- 'error' => $l->t('Data directory (%s) is readable by other users', array($dataDirectory)),
- 'hint' => $permissionsModHint
- );
- }
+ if (substr($perms, 2, 1) != '0') {
+ $errors[] = array(
+ 'error' => $l->t('Data directory (%s) is readable by other users', array($dataDirectory)),
+ 'hint' => $permissionsModHint
+ );
}
}
return $errors;
@@ -933,7 +929,7 @@ class OC_Util {
public static function checkDataDirectoryValidity($dataDirectory) {
$l = \OC::$server->getL10N('lib');
$errors = [];
- if (!self::runningOnWindows() && $dataDirectory[0] !== '/') {
+ if ($dataDirectory[0] !== '/') {
$errors[] = [
'error' => $l->t('Data directory (%s) must be an absolute path', [$dataDirectory]),
'hint' => $l->t('Check the value of "datadirectory" in your configuration')
@@ -1203,11 +1199,6 @@ class OC_Util {
* @return bool
*/
public static function isSetLocaleWorking() {
- // setlocale test is pointless on Windows
- if (OC_Util::runningOnWindows()) {
- return true;
- }
-
\Patchwork\Utf8\Bootup::initLocale();
if ('' === basename('ยง')) {
return false;