OK, so you are using clisp-20210628 while I am using clisp-20180218.
Looks like this introduced a regression since 20171024:
https://gitlab.com/gnu-clisp/clisp/-/commit/f64ebe7675907b2da58c80960ed7cb9b0ad954d9
namely, if a "/path/to/file" is a file, then
'(truename "/path/to/file/")' returns "/path/to/file/".
(although this "directory" path does not exist.)
In this fricas commit, in function "check_for_ext",
your new code uses "fricas_probe_file" (which uses 'truename')
while old code uses "probe-file", thus your code exposes this
clisp regression.
The clisp regression should be fixed in 20200612:
https://gitlab.com/gnu-clisp/clisp/-/commit/71b0ef597fb6540fe3538a4f337510e9bf09d82a
So I propose the following workaround: test 'fname' before 'dname':
- Qian
diff --git a/src/lisp/fricas-lisp.lisp b/src/lisp/fricas-lisp.lisp
index 1c863854..d86f6970 100644
--- a/src/lisp/fricas-lisp.lisp
+++ b/src/lisp/fricas-lisp.lisp
@@ -789,10 +789,10 @@ with this hack and will try to convince the GCL
crowd to fix this.
-1))
#+:clisp (let* ((fname (|trim_directory_name| (namestring filename)))
(dname (|pad_directory_name| fname)))
- (if (ignore-errors (truename dname))
- 1
- (if (ignore-errors (truename fname))
- 0
+ (if (ignore-errors (truename fname))
+ 0
+ (if (ignore-errors (truename dname))
+ 1
-1)))
#+:abcl
(if (ext:file-directory-p filename)
@@ -839,8 +839,8 @@ with this hack and will try to convince the GCL
crowd to fix this.
#+(or :abcl :ecl :lispworks :openmcl :poplog) (probe-file file)
#+:clisp(let* ((fname (|trim_directory_name| (namestring file)))
(dname (|pad_directory_name| fname)))
- (or (ignore-errors (truename dname))
- (ignore-errors (truename fname))))
+ (or (ignore-errors (truename fname))
+ (ignore-errors (truename dname))))
)
#-:cmu