able to get root dir

This commit is contained in:
Xiang Li 2013-08-09 14:00:12 -07:00
parent 4c70b0738a
commit 73233798a9

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