Skip to content

Commit adff051

Browse files
committed
fix: #538 http file download skipped if headResp.ContentLength is 0
1 parent 3713030 commit adff051

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

get_http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ func (g *HttpGetter) GetFile(dst string, src *url.URL) error {
447447
if fi, err := f.Stat(); err == nil {
448448
if _, err = f.Seek(0, io.SeekEnd); err == nil {
449449
currentFileSize = fi.Size()
450-
if currentFileSize >= headResp.ContentLength {
450+
if currentFileSize >= headResp.ContentLength && currentFileSize != 0 {
451451
// file already present
452452
return nil
453453
}

0 commit comments

Comments
 (0)