Skip to content

Commit

Permalink
Pathnames whose namestring start with "./" have :RELATIVE directory
Browse files Browse the repository at this point in the history
fixes <#666>.
  • Loading branch information
easye committed Apr 8, 2024
1 parent 7ee6f37 commit 1fc46f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/org/armedbear/lisp/Pathname.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ private static final Pathname init(String s) {
result.setDirectory(new Cons(Keyword.RELATIVE));
return result;
}
if (s.startsWith("./"))
{ s = s.substring(2); }
if (s.equals("..") || s.equals("../")) {
result.setDirectory(list(Keyword.RELATIVE, Keyword.UP));
return result;
Expand Down Expand Up @@ -425,6 +423,9 @@ private static final LispObject parseDirectory(String d) {
if (d.equals("/") || (Utilities.isPlatformWindows && d.equals("\\"))) {
return new Cons(Keyword.ABSOLUTE);
}
if (d.equals("./")) {
return new Cons(Keyword.RELATIVE);
}
LispObject result;
if (d.startsWith("/") || (Utilities.isPlatformWindows && d.startsWith("\\"))) {
result = new Cons(Keyword.ABSOLUTE);
Expand Down

0 comments on commit 1fc46f5

Please sign in to comment.