Pull request 1752: 5373-mips-autoupdate
Updates #5270.
Updates #5373.
Squashed commit of the following:
commit ad4654fa63beac13c4fbb38aa8fd06eaec25cb5e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Feb 27 17:00:28 2023 +0300
updater: imp docs
commit c3482766df6b831eae529e209ea7fa0a87f1b417
Merge: 1cbee78b 386add03
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Feb 27 16:59:13 2023 +0300
Merge branch 'master' into 5373-mips-autoupdate
commit 1cbee78b94914c7d72c837cd2fad96a50ac2c30a
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Feb 27 11:57:28 2023 +0300
all: fix autoupdate on mips*
This commit is contained in:
@@ -272,7 +272,7 @@ func (u *Updater) backup(firstRun bool) (err error) {
|
||||
wd := u.workDir
|
||||
err = copySupportingFiles(u.unpackedFiles, wd, u.backupDir)
|
||||
if err != nil {
|
||||
return fmt.Errorf("copySupportingFiles(%s, %s) failed: %s", wd, u.backupDir, err)
|
||||
return fmt.Errorf("copySupportingFiles(%s, %s) failed: %w", wd, u.backupDir, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -283,7 +283,7 @@ func (u *Updater) backup(firstRun bool) (err error) {
|
||||
func (u *Updater) replace() error {
|
||||
err := copySupportingFiles(u.unpackedFiles, u.updateDir, u.workDir)
|
||||
if err != nil {
|
||||
return fmt.Errorf("copySupportingFiles(%s, %s) failed: %s", u.updateDir, u.workDir, err)
|
||||
return fmt.Errorf("copySupportingFiles(%s, %s) failed: %w", u.updateDir, u.workDir, err)
|
||||
}
|
||||
|
||||
log.Debug("updater: renaming: %s to %s", u.currentExeName, u.backupExeName)
|
||||
@@ -315,7 +315,7 @@ func (u *Updater) clean() {
|
||||
// MaxPackageFileSize is a maximum package file length in bytes. The largest
|
||||
// package whose size is limited by this constant currently has the size of
|
||||
// approximately 9 MiB.
|
||||
const MaxPackageFileSize = 32 * 1024 * 1024
|
||||
const MaxPackageFileSize = 32 * 10 * 1024
|
||||
|
||||
// Download package file and save it to disk
|
||||
func (u *Updater) downloadPackageFile() (err error) {
|
||||
|
||||
Reference in New Issue
Block a user