Commit 2f50caab authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse: clear EntryOut for READDIRPLUS in base library

parent a533f0a5
......@@ -100,7 +100,9 @@ func (l *DirEntryList) AddDirLookupEntry(e DirEntry) *EntryOut {
if !ok {
return nil
}
return (*EntryOut)(unsafe.Pointer(&l.buf[lastStart]))
result := (*EntryOut)(unsafe.Pointer(&l.buf[lastStart]))
*result = EntryOut{}
return result
}
func (l *DirEntryList) bytes() []byte {
......
......@@ -98,9 +98,6 @@ func (d *connectorDir) ReadDirPlus(input *fuse.ReadIn, out *fuse.DirEntryList) (
continue
}
// Clear entryDest before use it, some fields can be corrupted if does not set all fields in rawFS.Lookup
*entryDest = fuse.EntryOut{}
d.rawFS.Lookup(&input.InHeader, e.Name, entryDest)
}
return fuse.OK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment