remove bool argument from getDirectory

Signed-off-by: Alexandre Beslic <abronan@docker.com>
This commit is contained in:
Alexandre Beslic 2015-05-13 18:05:47 -07:00
parent ccf6e37c16
commit a73c89d42b
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ func (s *Etcd) Put(key string, value []byte) error {
if etcdError, ok := err.(*etcd.EtcdError); ok { if etcdError, ok := err.(*etcd.EtcdError); ok {
if etcdError.ErrorCode == 104 { // Not a directory if etcdError.ErrorCode == 104 { // Not a directory
// Remove the last element (the actual key) and set the prefix as a dir // Remove the last element (the actual key) and set the prefix as a dir
err = s.createDirectory(getDirectory(key, false)) err = s.createDirectory(getDirectory(key))
if _, err := s.client.Set(key, string(value), 0); err != nil { if _, err := s.client.Set(key, string(value), 0); err != nil {
return err return err
} }

View File

@ -24,7 +24,7 @@ func normalize(key string) string {
// //
// /path/to/ // /path/to/
// //
func getDirectory(key string, omit bool) string { func getDirectory(key string) string {
parts := splitKey(key) parts := splitKey(key)
parts = parts[:len(parts)-1] parts = parts[:len(parts)-1]
return "/" + join(parts) return "/" + join(parts)