Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-07-08 16:55:17 +0300
committerMorris Jobke <hey@morrisjobke.de>2016-07-08 16:55:17 +0300
commitc2d88a08b796ca19c8b5ec63bfd34ac32ead4208 (patch)
treef18e0ba4d05361456a6712378ccc0784620c1e9c /console.php
parent48f9e4ed03f3148d62919a95496ee43164d3e707 (diff)
Remove unneeded checks if it runs on a Windows machine
* the setup check is still there
Diffstat (limited to 'console.php')
-rw-r--r--console.php26
1 files changed, 12 insertions, 14 deletions
diff --git a/console.php b/console.php
index ed19d41d484..4576cce885c 100644
--- a/console.php
+++ b/console.php
@@ -59,20 +59,18 @@ try {
set_exception_handler('exceptionHandler');
- if (!OC_Util::runningOnWindows()) {
- if (!function_exists('posix_getuid')) {
- echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
- exit(0);
- }
- $user = posix_getpwuid(posix_getuid());
- $configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php'));
- if ($user['name'] !== $configUser['name']) {
- echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL;
- echo "Current user: " . $user['name'] . PHP_EOL;
- echo "Owner of config.php: " . $configUser['name'] . PHP_EOL;
- echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL;
- exit(0);
- }
+ if (!function_exists('posix_getuid')) {
+ echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
+ exit(0);
+ }
+ $user = posix_getpwuid(posix_getuid());
+ $configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php'));
+ if ($user['name'] !== $configUser['name']) {
+ echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL;
+ echo "Current user: " . $user['name'] . PHP_EOL;
+ echo "Owner of config.php: " . $configUser['name'] . PHP_EOL;
+ echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL;
+ exit(0);
}
$oldWorkingDir = getcwd();