GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3119
@@ -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) {
@@ -87,12 +87,7 @@ func (s *IGDService) DeletePortMapping(protocol nat.Protocol, externalPort int)
body := fmt.Sprintf(tpl, s.URN, externalPort, protocol)
_, err := soapRequest(s.URL, s.URN, "DeletePortMapping", body)
-
+ return err
// GetExternalIPAddress queries the IGD service for its external IP address.