fix get return the last modified index of the node

This commit is contained in:
Xiang Li 2013-11-09 19:05:38 -08:00
parent eca433cee5
commit d87e0e93d3
2 changed files with 1 additions and 2 deletions

View File

@ -19,7 +19,6 @@ type Node struct {
CreateIndex uint64
CreateTerm uint64
ModifiedIndex uint64
ModifiedTerm uint64
Parent *Node `json:"-"` // should not encode this field! avoid circular dependency.

View File

@ -91,7 +91,7 @@ func (s *store) Get(nodePath string, recursive, sorted bool) (*Event, error) {
return nil, err
}
e := newEvent(Get, nodePath, s.CurrentIndex)
e := newEvent(Get, nodePath, n.ModifiedIndex)
if n.IsDir() { // node is a directory
e.Dir = true