Open aep opened 1 year ago
just appening O_RDWR if its not a dir works, but i'm not sure if this is correct
case styx.Topen:
s, err := os.Stat(p)
if err != nil {
continue
}
var f *os.File
if s.IsDir() {
f, err = os.OpenFile(p, msg.Flag , 0777)
} else {
f ,err = os.OpenFile(p, msg.Flag | os.O_RDWR , 0777)
}
log.Println("Open file", p, msg.Flag, err)
msg.Ropen(f, err)
not sure if this is correct and i'm just confused?
indicates Flag is always 0, so that when i do
bar is just an empty file. presumably because it would require O_RDWR to actually write anything