diff --git a/index.php b/index.php index 583c2d99..f5316786 100644 --- a/index.php +++ b/index.php @@ -522,6 +522,8 @@ private function getUpdateServerResponse(): array { CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $updateURL, CURLOPT_USERAGENT => 'Nextcloud Updater', + CURLOPT_FOLLOWLOCATION => 1, + CURLOPT_MAXREDIRS => 2, ]); if ($this->getConfigOption('proxy') !== null) { @@ -1006,7 +1008,7 @@ private function moveWithExclusions(string $dataLocation, array $excludedElement throw new \Exception('Could not mkdir ' . $this->nextcloudDir . '/' . dirname($fileName)); } } - $state = rename($path, $this->nextcloudDir . '/' . $fileName); + $state = @rename($path, $this->nextcloudDir . '/' . $fileName); if ($state === false) { throw new \Exception( sprintf( diff --git a/updater.phar b/updater.phar index ebb179ab..f257a08b 100755 Binary files a/updater.phar and b/updater.phar differ