mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:34:30 +01:00
fuse: support R/W files only if truncate is set.
Any reads on the file handle will return an error. This is to support windows/samba writes.
This commit is contained in:
parent
2756900749
commit
7929b6e756
@ -119,7 +119,7 @@ func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenR
|
||||
resp.Flags |= fuse.OpenNonSeekable
|
||||
}
|
||||
return newReadFileHandle(o)
|
||||
case req.Flags.IsWriteOnly():
|
||||
case req.Flags.IsWriteOnly() || (req.Flags.IsReadWrite() && (req.Flags&fuse.OpenTruncate) != 0):
|
||||
resp.Flags |= fuse.OpenNonSeekable
|
||||
src := newCreateInfo(f.d.f, o.Remote())
|
||||
fh, err := newWriteFileHandle(f.d, f, src)
|
||||
|
Loading…
Reference in New Issue
Block a user