Auto-update interface

This commit is contained in:
Andrey Meshkov
2020-07-20 21:14:07 +03:00
parent 62ccd3fb41
commit 1bb183c2aa
3 changed files with 46 additions and 0 deletions

View File

@@ -244,6 +244,8 @@ func getUpdateInfo(jsonData []byte) (*updateInfo, error) {
if runtime.GOOS == "windows" {
binName = "AdGuardHome.exe"
}
// TODO: This is a mistake, work dir can be different
u.curBinName = filepath.Join(workDir, binName)
if !util.FileExists(u.curBinName) {
return nil, fmt.Errorf("executable file %s doesn't exist", u.curBinName)