geesefs-0-30-9
Aaron Jacobs 2015-07-24 08:09:07 +10:00
parent d8e3e30f99
commit 7133c835aa
1 changed files with 12 additions and 17 deletions

View File

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