summaryrefslogtreecommitdiffstats
path: root/core/setup/controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/setup/controller.php')
-rw-r--r--core/setup/controller.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/core/setup/controller.php b/core/setup/controller.php
index c046bd5eaa6..fca16ea27be 100644
--- a/core/setup/controller.php
+++ b/core/setup/controller.php
@@ -116,16 +116,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()) {