eliminate "." in pathname-directory - gcl.git - GNU Common Lisp

index : gcl.git
GNU Common Lisp
summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamm Maguire <camm@transcendence.maguirefamily.org>2025年04月22日 10:27:28 -0400
committerCamm Maguire <camm@transcendence.maguirefamily.org>2025年04月22日 10:27:28 -0400
commitae03657c4c8042a29463e02ece7c2386abe386e4 (patch)
tree5b3e68234ccf7cd90ca2cdb8fb8786e268337ae9
parent090bd52267435e7bcb428959f3973c2cca3c2147 (diff)
downloadgcl-ae03657c4c8042a29463e02ece7c2386abe386e4.tar.gz
eliminate "." in pathname-directory
Diffstat
-rw-r--r--gcl/lsp/gcl_make_pathname.lsp 8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcl/lsp/gcl_make_pathname.lsp b/gcl/lsp/gcl_make_pathname.lsp
index 7f5d21fe0..5892d828f 100644
--- a/gcl/lsp/gcl_make_pathname.lsp
+++ b/gcl/lsp/gcl_make_pathname.lsp
@@ -112,10 +112,12 @@
(defun canonicalize-pathname-directory (l)
(cond ((eq l :wild) (canonicalize-pathname-directory '(:absolute :wild-inferiors)))
((stringp l) (canonicalize-pathname-directory (list :absolute l)))
- ((mapl (lambda (x &aux (c (car x)))
- (when (and (or (stringp c) (eq c :wild)) (eq (cadr x) :back))
+ ((mapl (lambda (x &aux (c (car x))
+ (skip (cond ((equal c ".") (cdr x))
+ ((when (or (stringp c) (eq c :wild)) (eq (cadr x) :back)) (cddr x)))))
+ (when skip
(return-from canonicalize-pathname-directory
- (canonicalize-pathname-directory (nconc (ldiff-nf l x) (cddr x))))))
+ (canonicalize-pathname-directory (nconc (ldiff-nf l x) skip)))))
l))))
(defvar *default-pathname-defaults* (init-pathname nil nil nil nil nil nil ""))
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月05日 03:09:52 +0000

AltStyle によって変換されたページ (->オリジナル) /