[Pkg-owncloud-commits] [owncloud] 181/258: Don't test for htaccess if we cant write into the datadir anyway
David Prévot
taffit at moszumanska.debian.org
Sat Oct 11 17:22:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit d102cb4ffacc8583c5b51297555c60e711e305bf
Author: Robin Appelman <icewind at owncloud.com>
Date: Thu Sep 18 14:23:38 2014 +0200
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(-)
diff --git a/core/setup/controller.php b/core/setup/controller.php
index c046bd5..fca16ea 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()) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list