From 644df591b138d28b1631ecc13ebe600c16a909f1 Mon Sep 17 00:00:00 2001 From: Alex Harpin Date: Sat, 19 Jun 2021 21:06:57 +0100 Subject: 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 --- lib/private/Setup.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib') 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'); + } } -- cgit v1.2.3