mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix #95
This commit is contained in:
parent
1107f1d7ab
commit
928781aaa3
@ -313,7 +313,12 @@ func (s *Store) Get(key string) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(resps) == 1 {
|
||||
key = path.Clean("/" + key)
|
||||
|
||||
// If the number of resps == 1 and the response key
|
||||
// is the key we query, a signal key-value should
|
||||
// be returned
|
||||
if len(resps) == 1 && resps[0].Key == key {
|
||||
return json.Marshal(resps[0])
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user