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:
authorLukas Reschke <lukas@owncloud.com>2014-09-26 19:25:28 +0400
committerLukas Reschke <lukas@owncloud.com>2014-09-26 19:25:28 +0400
commitc20d629836ca98dd57c4b323edf05612b18a5d37 (patch)
treee05549de4623cf52a0cfd04c6d43f259b8699aa4 /core/setup
parent53f6d74938647de6921da47d28bd06b30a708cc5 (diff)
Try to create datadirectory to test whether the .htaccess works
Fixes https://github.com/owncloud/core/pull/11299#issuecomment-56968588 and also https://github.com/owncloud/core/issues/10628 together with https://github.com/owncloud/core/pull/11299#issuecomment-56968588 when backported.
Diffstat (limited to 'core/setup')
-rw-r--r--core/setup/controller.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/setup/controller.php b/core/setup/controller.php
index 15679e33976..53f247e9769 100644
--- a/core/setup/controller.php
+++ b/core/setup/controller.php
@@ -116,9 +116,14 @@ class Controller {
$errors = array();
- if (is_dir($datadir) and is_writable($datadir)) {
+ // Create data directory to test whether the .htaccess works
+ // Notice that this is not necessarily the same data directory as the one
+ // that will effectively be used.
+ @mkdir($datadir);
+ if (is_dir($datadir) && 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) {