Skip to content

Commit

Permalink
fixed readdir on root
Browse files Browse the repository at this point in the history
  • Loading branch information
lalkaka committed Apr 19, 2011
1 parent 77f201e commit 4403ac2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion master/master.go
Expand Up @@ -138,7 +138,13 @@ func (m *Master) ReadDir(args *sfs.ReadDirArgs, ret *sfs.ReadDirReturn) os.Error
return err
}

cnt := dirs.Len()
var cnt int
if dirs != nil {
cnt = dirs.Len()
} else {
cnt = 0
}

retSlice := make([]string, cnt + len(files))

var i int
Expand Down

0 comments on commit 4403ac2

Please sign in to comment.