NU/cmd/nu/nu.go: fout opslaan in bestand
This commit is contained in:
@@ -180,10 +180,10 @@ func doArticle(filename string, url string, timestamp time.Time, needUpdate bool
|
||||
if err = json.Unmarshal([]byte(s), &doc); err != nil {
|
||||
_ = w(err, url)
|
||||
|
||||
fp, err := os.Create(filename + ".err")
|
||||
x(err)
|
||||
_, err = fmt.Fprintf(fp, "%s: %v\n", url, err)
|
||||
x(err)
|
||||
fp, err2 := os.Create(filename + ".err")
|
||||
x(err2)
|
||||
_, err2 = fmt.Fprintf(fp, "%s: %v\n%s\n", url, err, s)
|
||||
x(err2)
|
||||
x(fp.Close())
|
||||
x(os.Chtimes(filename+".err", timestamp, timestamp))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user