diff --git a/cmd/cmount/fs.go b/cmd/cmount/fs.go index f155399ad..b993a222b 100644 --- a/cmd/cmount/fs.go +++ b/cmd/cmount/fs.go @@ -283,7 +283,7 @@ func (fsys *FS) Open(path string, flags int) (errc int, fh uint64) { defer log.Trace(path, "flags=0x%X", flags)("errc=%d, fh=0x%X", &errc, &fh) // translate the fuse flags to os flags - flags = translateOpenFlags(flags) | os.O_CREATE + flags = translateOpenFlags(flags) handle, err := fsys.VFS.OpenFile(path, flags, 0777) if errc != 0 { return translateError(err), fhUnset diff --git a/cmd/mount/file.go b/cmd/mount/file.go index 7632203fe..25f5625e0 100644 --- a/cmd/mount/file.go +++ b/cmd/mount/file.go @@ -3,7 +3,6 @@ package mount import ( - "os" "time" "bazil.org/fuse" @@ -69,10 +68,7 @@ func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenR // fuse flags are based off syscall flags as are os flags, so // should be compatible - // - // we seem to be missing O_CREATE here so add it in to allow - // file creation - handle, err := f.File.Open(int(req.Flags) | os.O_CREATE) + handle, err := f.File.Open(int(req.Flags)) if err != nil { return nil, translateError(err) }