mirror of
https://github.com/octoleo/restic.git
synced 2024-11-25 14:17:42 +00:00
fuse: Don't return an error for EOF
This commit is contained in:
parent
d89f2e5226
commit
f49f5c5903
@ -4,7 +4,6 @@
|
||||
package fuse
|
||||
|
||||
import (
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/restic"
|
||||
|
||||
"github.com/restic/restic/internal/debug"
|
||||
@ -111,7 +110,10 @@ func (f *file) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadR
|
||||
if uint64(offset) > f.node.Size {
|
||||
debug.Log("Read(%v): offset is greater than file size: %v > %v",
|
||||
f.node.Name, req.Offset, f.node.Size)
|
||||
return errors.New("offset greater than files size")
|
||||
|
||||
// return no data
|
||||
resp.Data = resp.Data[:0]
|
||||
return nil
|
||||
}
|
||||
|
||||
// handle special case: file is empty
|
||||
|
Loading…
Reference in New Issue
Block a user