mount: detect and deal with seeking beyond end of file - fixes #828

This commit is contained in:
Nick Craig-Wood
2016-11-05 09:59:36 +00:00
parent 7cfb1bdc70
commit 64b5a76bec
3 changed files with 27 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ func mountOptions(device string) (options []fuse.MountOption) {
// returns an error, and an error channel for the serve process to
// report an error when fusermount is called.
func mount(f fs.Fs, mountpoint string) (<-chan error, error) {
fs.Debug(f, "Mounting on %q", mountpoint)
c, err := fuse.Mount(mountpoint, mountOptions(f.Name()+":"+f.Root())...)
if err != nil {
return nil, err