1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

mount: add --no-seek flag to disable seeking

This commit is contained in:
Nick Craig-Wood
2016-10-06 13:37:45 +01:00
parent e94850f322
commit f45b3c87bf
2 changed files with 5 additions and 0 deletions

View File

@@ -114,6 +114,9 @@ func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenR
switch {
case req.Flags.IsReadOnly():
if noSeek {
resp.Flags |= fuse.OpenNonSeekable
}
return newReadFileHandle(o)
case req.Flags.IsWriteOnly():
resp.Flags |= fuse.OpenNonSeekable