@@ -169,7 +169,7 @@ func UpdateHttpHandler(w http.ResponseWriter, req *http.Request) error {
// Delete Handler
func DeleteHttpHandler(w http.ResponseWriter, req *http.Request) error {
key := req.URL.Path[len("/v2/keys"):]
-
+
debugf("recv.delete[%v] [%v%v]\n", req.RemoteAddr, req.Host, req.URL)
command := &DeleteCommand{
@@ -244,7 +244,7 @@ func (fs *FileSystem) Delete(nodePath string, recursive bool, index uint64, term
}
fs.WatcherHub.notify(e)
return e, nil
@@ -75,7 +75,7 @@ func (n *Node) Remove(recursive bool, callback func(path string)) error {
if !n.IsDir() { // file node: key-value pair
_, name := path.Split(n.Path)
if n.Parent != nil && n.Parent.Children[name] == n {
// This is the only pointer to Node object
// Handled by garbage collector