diff --git a/libfuse/dir.go b/libfuse/dir.go index 486d63aa55..711b34285a 100644 --- a/libfuse/dir.go +++ b/libfuse/dir.go @@ -8,6 +8,7 @@ import ( "fmt" "math" "os" + "runtime" "strings" "sync" "syscall" @@ -731,6 +732,16 @@ func (d *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, switch e := err.(type) { case nil: + if runtime.GOOS == "darwin" { + movedNode, _, err := d.folder.fs.config.KBFSOps().Lookup( + ctx, realNewDir.node, req.NewName) + if err == nil { + d.folder.nodesMu.Lock() + delete(d.folder.nodes, movedNode.GetID()) + d.folder.nodesMu.Unlock() + } + } + return nil case libkbfs.RenameAcrossDirsError: var execPathErr error