Skip to content

Commit 698943d

Browse files
authored
Merge pull request #3 from ziXiong/main
Fix null URL ETag for better compatibility
2 parents e210458 + e111f4f commit 698943d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

download.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func downloadFile(filePath string, url string) (bool, error) {
112112
fmt.Println("downloading Etag: " + url)
113113
newEtag := getEtag(url)
114114

115-
if newEtag != "" && currentEtag != newEtag {
115+
if newEtag == "" || currentEtag != newEtag {
116116
fileWriteSmall(etagFilePath, newEtag)
117117

118118
fmt.Println("downloading data file: " + url)
@@ -150,4 +150,4 @@ func downloadSelect(name string, downloads []Download, missing []string) []Downl
150150
}
151151

152152
return downloads
153-
}
153+
}

0 commit comments

Comments
 (0)