From 72af1407237f716282308c9288e7e7170343376e Mon Sep 17 00:00:00 2001 From: Alex Harpin Date: Sat, 19 Jun 2021 19:56:54 +0100 Subject: Move CAN_INSTALL check to method and remove unlink from SetupController Move the check for the CAN_INSTALL file in the config directory to a method in the Setup class and remove the call to unlink from the SetupController as this in now handled in the Setup class. Signed-off-by: Alex Harpin --- lib/private/Setup.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/Setup.php b/lib/private/Setup.php index d1936f55f28..bd176984678 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 (\OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL')) { + if (self::canInstallExists()) { unlink(\OC::$configDir.'/CAN_INSTALL'); } @@ -599,4 +599,11 @@ class Setup { 'channel' => (string)$OC_Channel, ]; } + + /** + * @return bool + */ + public function canInstallExists() { + return \OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL'); + } } -- cgit v1.2.3