Dont truncate the output file just to get tis permission bits

This commit is contained in:
Kovid Goyal
2022-12-01 14:13:28 +05:30
parent 0a985134e2
commit e187265d04

View File

@@ -121,7 +121,7 @@ func (self *Output) commit() {
} else {
self.dest.Close()
if !self.is_stream {
f, err := os.Create(self.arg)
f, err := os.OpenFile(self.arg, os.O_CREATE|os.O_RDONLY, 0666)
if err == nil {
fi, err := f.Stat()
if err == nil {