TRUNC new file

This commit is contained in:
Jeff Carr 2024-12-11 13:55:58 -06:00
parent bbcac059de
commit 3ffab5ba21
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ func writeoutXml(domcfg *libvirtxml.Domain, filename string) error {
} }
outfile := "/tmp/" + filename + ".xml" outfile := "/tmp/" + filename + ".xml"
regfile, err := os.OpenFile(outfile, os.O_RDWR|os.O_CREATE, 0666) regfile, err := os.OpenFile(outfile, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil { if err != nil {
return err return err
} }