diff --git a/src/PHPCR/Shell/Phpcr/PhpcrSession.php b/src/PHPCR/Shell/Phpcr/PhpcrSession.php index 2b43eeb8..52262836 100644 --- a/src/PHPCR/Shell/Phpcr/PhpcrSession.php +++ b/src/PHPCR/Shell/Phpcr/PhpcrSession.php @@ -104,6 +104,10 @@ public function chdir($path) } } + if ($newPath !== '/') { + $newPath = rtrim($newPath, '/'); + } + // check that path is valid $this->getNode($newPath); }