Skip to content

Commit ca01491

Browse files
committed
[FELIX-6191] [gogo][jline] The cd command should normalize the directory
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1868510 13f79535-47bb-0310-9956-ffa450edef68
1 parent 614b147 commit ca01491

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • gogo/jline/src/main/java/org/apache/felix/gogo/jline

gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ protected void cd(CommandSession session, Process process, String[] argv) throws
10501050
throw new IllegalArgumentException("usage: cd DIRECTORY");
10511051
}
10521052
Path cwd = session.currentDir();
1053-
cwd = cwd.resolve(opt.args().get(0)).toAbsolutePath();
1053+
cwd = cwd.resolve(opt.args().get(0)).toAbsolutePath().normalize();
10541054
if (!Files.exists(cwd)) {
10551055
throw new IOException("no such file or directory: " + opt.args().get(0));
10561056
} else if (!Files.isDirectory(cwd)) {

0 commit comments

Comments
 (0)