From 8bb5deda8669115a1cc850a8f82ceddc92a84e3c Mon Sep 17 00:00:00 2001 From: Mark Evenson Date: Mon, 8 Apr 2024 08:27:07 +0200 Subject: [PATCH] Pathnames whose namestring start with "./" have :RELATIVE directory fixes . --- src/org/armedbear/lisp/Pathname.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/org/armedbear/lisp/Pathname.java b/src/org/armedbear/lisp/Pathname.java index 19b6acd96..639e37485 100644 --- a/src/org/armedbear/lisp/Pathname.java +++ b/src/org/armedbear/lisp/Pathname.java @@ -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; @@ -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);