mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 07:29:35 +01:00
mount: fix panic on File.Open - Fixes #3595
This problem was introduced in "mount: allow files of unkown size to
be read properly" 0baafb158f
by failure to check that the
DirEntry was nil or not.
This commit is contained in:
parent
6337cc70d3
commit
15b1feea9d
@ -74,7 +74,7 @@ func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenR
|
||||
}
|
||||
|
||||
// If size unknown then use direct io to read
|
||||
if handle.Node().DirEntry().Size() < 0 {
|
||||
if entry := handle.Node().DirEntry(); entry != nil && entry.Size() < 0 {
|
||||
resp.Flags |= fuse.OpenDirectIO
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user