From 6ff29f3874cac3c263c255b2c36cda5b8a1c67f1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 18 Sep 2014 14:23:38 +0200 Subject: Don't test for htaccess if we cant write into the datadir anyway --- core/setup/controller.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'core/setup/controller.php') diff --git a/core/setup/controller.php b/core/setup/controller.php index 5da94e83ccc..9dcc9acfc64 100644 --- a/core/setup/controller.php +++ b/core/setup/controller.php @@ -119,16 +119,18 @@ class Controller { $errors = array(); - // Protect data directory here, so we can test if the protection is working - \OC_Setup::protectDataDirectory(); - try { - $htaccessWorking = \OC_Util::isHtaccessWorking(); - } catch (\OC\HintException $e) { - $errors[] = array( - 'error' => $e->getMessage(), - 'hint' => $e->getHint() - ); - $htaccessWorking = false; + if (is_dir($datadir) and is_writable($datadir)) { + // Protect data directory here, so we can test if the protection is working + \OC_Setup::protectDataDirectory(); + try { + $htaccessWorking = \OC_Util::isHtaccessWorking(); + } catch (\OC\HintException $e) { + $errors[] = array( + 'error' => $e->getMessage(), + 'hint' => $e->getHint() + ); + $htaccessWorking = false; + } } if (\OC_Util::runningOnMac()) { -- cgit v1.2.3