forked from mirror/client_golang
Fix permissions of tempfile
Signed-off-by: Sevag Hanssian <sevag.hanssian@gmail.com>
This commit is contained in:
parent
924d5919f3
commit
88f4223778
|
@ -562,6 +562,10 @@ func WriteToTextfile(filename string, g Gatherer) error {
|
|||
if err := tmp.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := os.Chmod(tmp.Name(), 0644); err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Rename(tmp.Name(), filename)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue