Skip to content

Commit c496d93

Browse files
authored
Merge pull request #189 from middlebrain/cd_allow_trailing_slash
Command shell:path:change (cd): Allow trailing slash on path
2 parents e3ff8fb + 8f5f1a4 commit c496d93

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/PHPCR/Shell/Phpcr/PhpcrSession.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ public function chdir($path)
104104
}
105105
}
106106

107+
if ($newPath !== '/') {
108+
$newPath = rtrim($newPath, '/');
109+
}
110+
107111
// check that path is valid
108112
$this->getNode($newPath);
109113
}

0 commit comments

Comments
 (0)