mount: remove nonseekable flag from write files - fixes #3461

Before this change rclone marked files opened for write without VFS
cache with the non seekable flag.

This caused problems with rclone mount layerd with mergerfs.

This change removes the hint and lets rclone do all the checking for
seekability.
This commit is contained in:
Nick Craig-Wood 2019-08-21 17:11:57 +01:00
parent 941dde6940
commit 341d880027

View File

@ -4,7 +4,6 @@ package mount
import (
"context"
"io"
"time"
"bazil.org/fuse"
@ -74,11 +73,6 @@ func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenR
return nil, translateError(err)
}
// See if seeking is supported and set FUSE hint accordingly
if _, err = handle.Seek(0, io.SeekCurrent); err != nil {
resp.Flags |= fuse.OpenNonSeekable
}
return &FileHandle{handle}, nil
}