Commit 7133c835 authored by Aaron Jacobs's avatar Aaron Jacobs

RmDirOp

parent d8e3e30f
...@@ -218,24 +218,19 @@ func Convert( ...@@ -218,24 +218,19 @@ func Convert(
io = to io = to
co = &to.commonOp co = &to.commonOp
case *fuseshim.RemoveRequest: case fusekernel.OpRmdir:
if typed.Dir { buf := m.Bytes()
to := &RmDirOp{ n := len(buf)
bfReq: typed, if n == 0 || buf[n-1] != '\x00' {
Parent: InodeID(typed.Header.Node), goto corrupt
Name: typed.Name, }
}
io = to to := &RmDirOp{
co = &to.commonOp Parent: InodeID(m.Header().Node),
} else { Name: string(buf[:n-1]),
to := &UnlinkOp{
bfReq: typed,
Parent: InodeID(typed.Header.Node),
Name: typed.Name,
}
io = to
co = &to.commonOp
} }
io = to
co = &to.commonOp
case *fuseshim.OpenRequest: case *fuseshim.OpenRequest:
if typed.Dir { if typed.Dir {
......
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