commit | ca01491077beff0e45a65a4ff0c9b289083c980d | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Wed Oct 16 15:44:12 2019 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Wed Oct 16 15:44:12 2019 +0000 |
tree | 661bd0310745f384870bf82cec4e9b1411e89a76 | |
parent | 614b147e81e2f3cd47be9a481a55d5bef16156cb [diff] |
[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
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java index ed170d1..44424d5 100644 --- a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java +++ b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Posix.java
@@ -1050,7 +1050,7 @@ throw new IllegalArgumentException("usage: cd DIRECTORY"); } Path cwd = session.currentDir(); - cwd = cwd.resolve(opt.args().get(0)).toAbsolutePath(); + cwd = cwd.resolve(opt.args().get(0)).toAbsolutePath().normalize(); if (!Files.exists(cwd)) { throw new IOException("no such file or directory: " + opt.args().get(0)); } else if (!Files.isDirectory(cwd)) {