-
Notifications
You must be signed in to change notification settings - Fork 116
updater.go - misuse of os.WriteFile ? #667
Copy link
Copy link
Closed
Description
Given you have:
go-tuf/metadata/updater/updater.go
Line 595 in 830edf8
| file, err := os.CreateTemp(update.cfg.LocalMetadataDir, "tuf_tmp") |
Its not clear why you are doing this:
go-tuf/metadata/updater/updater.go
Line 601 in 830edf8
| err = os.WriteFile(file.Name(), data, 0644) |
_, err = file.Write(data) would surely be a far more sensible construct ?
I'm not going to open a PR on it, I'll leave that to your own coding preferences ...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done