updater/index.php
/**
	 * Finalize and cleanup the updater by finally replacing the updater script
	 */
Finalize and cleanup the updater by finally replacing the updater script
Finalize and cleanup the updater by finally replacing the updater script
public function finalize() {
		$this->silentLog('[info] finalize()');
		$storageLocation = $this->getDataDirectoryLocation() . '/updater-'.$this->getConfigOption('instanceid') . '/downloads/nextcloud/';
		$this->silentLog('[info] storage location: ' . $storageLocation);
		$this->moveWithExclusions($storageLocation, []);
		$state = rmdir($storageLocation);
		if($state === false) {
			throw new \Exception('Could not rmdir $storagelocation');
		}
		$state = unlink($this->getDataDirectoryLocation() . '/updater-'.$this->getConfigOption('instanceid') . '/.step');
		if($state === false) {
			throw new \Exception('Could not rmdir .step');
		}
		$this->silentLog('[info] end of finalize()');
	}
public function finalize ( ) { $ this -> silentLog ( '[info] finalize()' ) ; $ storageLocation = $ this -> getDataDirectoryLocation ( ) . '/updater-' . $ this -> getConfigOption ( 'instanceid' ) . '/downloads/nextcloud/' ; $ this -> silentLog ( '[info] storage location: ' . $ storageLocation ) ; $ this -> moveWithExclusions ( $ storageLocation , [ ] ) ; $ state = rmdir ( $ storageLocation ) ; if ( $ state === false ) { throw new \ Exception ( 'Could not rmdir $storagelocation' ) ; } $ state = unlink ( $ this -> getDataDirectoryLocation ( ) . '/updater-' . $ this -> getConfigOption ( 'instanceid' ) . '/.step' ) ; if ( $ state === false ) { throw new \ Exception ( 'Could not rmdir .step' ) ; } $ this -> silentLog ( '[info] end of finalize()' ) ; }
Finalize and cleanup the updater by finally replacing the updater script
Finalize and cleanup the updater by finally replacing the updater script