lib: simplify code

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3119
This commit is contained in:
Lars K.W. Gohlke
2016-05-18 22:47:11 +00:00
committed by Audrius Butkevicius
parent 8e060e23e3
commit 22280db5db
2 changed files with 2 additions and 11 deletions

View File

@@ -180,11 +180,7 @@ func upgradeToURL(archiveName, binary string, url string) error {
if err != nil {
return err
}
err = os.Rename(fname, binary)
if err != nil {
return err
}
return nil
return os.Rename(fname, binary)
}
func readRelease(archiveName, dir, url string) (string, error) {