Merge: * auto-update: use backup directory format without version: "agh-backup"

Close 

* commit '885b660808':
  * auto-update: refactor test;  test getUpdateInfo()
  * auto-update: use backup directory format without version: "agh-backup"
This commit is contained in:
Simon Zolin 2019-06-27 18:04:37 +03:00
commit b45e8e80fb
2 changed files with 50 additions and 13 deletions

View file

@ -164,7 +164,7 @@ func getUpdateInfo(jsonData []byte) (*updateInfo, error) {
}
u.updateDir = filepath.Join(workDir, fmt.Sprintf("agh-update-%s", u.newVer))
u.backupDir = filepath.Join(workDir, fmt.Sprintf("agh-backup-%s", versionString))
u.backupDir = filepath.Join(workDir, "agh-backup")
_, pkgFileName := filepath.Split(u.pkgURL)
if len(pkgFileName) == 0 {