aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Setup.php
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2021-06-19 21:06:57 +0100
committerAlex Harpin <development@landsofshadow.co.uk>2023-01-10 11:59:06 +0000
commit644df591b138d28b1631ecc13ebe600c16a909f1 (patch)
treeecfae936f082eaf0f898008bddc82e2fd5357e87 /lib/private/Setup.php
parentd5b52ddd21bc32d250d1d8d3d4308c00d505a0cf (diff)
downloadnextcloud-server-644df591b138d28b1631ecc13ebe600c16a909f1.tar.gz
nextcloud-server-644df591b138d28b1631ecc13ebe600c16a909f1.zip
Rename canInstallExists method and add new method for removal
Rename canInstallExists to shouldRemoveCanInstallFile to cover removal of this file for non-git channels and logging any failure to remove it. Add new method to detect if this file exists during web based installation. Signed-off-by: Alex Harpin <development@landsofshadow.co.uk>
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r--lib/private/Setup.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index bd176984678..e84a5e4987a 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -419,7 +419,7 @@ class Setup {
//and we are done
$config->setSystemValue('installed', true);
- if (self::canInstallExists()) {
+ if (self::shouldRemoveCanInstallFile()) {
unlink(\OC::$configDir.'/CAN_INSTALL');
}
@@ -603,7 +603,14 @@ class Setup {
/**
* @return bool
*/
- public function canInstallExists() {
+ public function shouldRemoveCanInstallFile() {
return \OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL');
}
+
+ /**
+ * @return bool
+ */
+ public function canInstallFileExists() {
+ return is_file(\OC::$configDir.'/CAN_INSTALL');
+ }
}