able to get root dir

This commit is contained in:
Xiang Li 2013-08-09 14:00:12 -07:00 committed by Brandon Philips
parent 076bd9903e
commit 328b92e8e7

View File

@ -124,6 +124,11 @@ func (t *tree) set(key string, value Node) bool {
func (t *tree) internalGet(key string) (*treeNode, bool) {
nodesName := split(key)
// should be able to get root
if len(nodesName) == 1 && nodesName[0] == "" {
return t.Root, true
}
nodeMap := t.Root.NodeMap
var i int