-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hey, if you call listSubdirs('/', true) in etcd/src/Client.php it works great but if you call listSubdirs('/', false) again you*ll get listSubdirs('/', true). I think the problem lives in traversalDir() method in etcd/src/Client.php. It stores in $this->dir globaly.
My quick fix would be:
public function listSubdirs($key = '/', $recursive = false)
{
try {
$data = $this->dirInfo($key, $recursive);
} catch (EtcdException $e) {
throw $e;
}
$iterator = new RecursiveArrayIterator($data);
//reset iterator array
$this->dirs = [];
return $this->traversalDir($iterator);
}
Metadata
Metadata
Assignees
Labels
No labels