mirror of
https://github.com/majd/ipatool
synced 2026-12-05 13:29:03 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f154ad4f9 |
No files matched your search
@@ -174,6 +174,12 @@ func (a *appstore) downloadFile(dst, sourceURL string) (err error) {
|
||||
return errors.Wrap(err, ErrOpenFile.Error())
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if closeErr := file.Close(); closeErr != err && err == nil {
|
||||
err = closeErr
|
||||
}
|
||||
}()
|
||||
|
||||
sizeMB := float64(res.ContentLength) / (1 << 20)
|
||||
a.logger.Verbose().Str("size", fmt.Sprintf("%.2fMB", sizeMB)).Msg("downloading")
|
||||
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ func (c *client[R]) Send(req Request) (Result[R], error) {
|
||||
}
|
||||
|
||||
func (c *client[R]) Do(req *http.Request) (*http.Response, error) {
|
||||
return c.internalClient.Do(req)
|
||||
return http.DefaultClient.Do(req)
|
||||
}
|
||||
|
||||
func (*client[R]) NewRequest(method, url string, body io.Reader) (*http.Request, error) {
|
||||
|
||||
Reference in new issue
Block a user