Skip to content

Commit

Permalink
Only remove when not on git channel
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Apr 8, 2019
1 parent 1c53c45 commit 98ed0ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/config/*.config.php
/config/mimetype*.json
/config/mount.php
/config/CAN_INSTALL
/apps/inc.php
/assets
/.htaccess
Expand Down
2 changes: 1 addition & 1 deletion core/Controller/SetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function finishSetup() {
}
\OC::$server->getIntegrityCodeChecker()->runInstanceVerification();

if (is_file(\OC::$configDir.'/CAN_INSTALL')) {
if (\OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL')) {
unlink(\OC::$configDir.'/CAN_INSTALL');
}

Expand Down
6 changes: 4 additions & 2 deletions lib/private/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ public function upgrade() {
$this->emit('\OC\Updater', 'maintenanceEnabled');
}

// Clear CAN_INSTALL file
unlink(\OC::$configDir.'/CAN_INSTALL');
// Clear CAN_INSTALL file if not on git
if (\OC_Util::getChannel() !== 'git') {
unlink(\OC::$configDir . '/CAN_INSTALL');
}

$installedVersion = $this->config->getSystemValue('version', '0.0.0');
$currentVersion = implode('.', \OCP\Util::getVersion());
Expand Down

0 comments on commit 98ed0ad

Please sign in to comment.