[PATCH] |trim_directory_name|: do not trim root directory

5 views
Skip to first unread message

Qian Yun

unread,
Apr 24, 2026, 9:16:39 AM (yesterday) Apr 24
to fricas-devel
diff --git a/src/lisp/fricas-lisp.lisp b/src/lisp/fricas-lisp.lisp
index 0633e542..5d52a4ba 100644
--- a/src/lisp/fricas-lisp.lisp
+++ b/src/lisp/fricas-lisp.lisp
@@ -733,7 +733,7 @@ with this hack and will try to convince the GCL
crowd to fix this.

(defun |trim_directory_name| (name)
#+(or :unix :win32)
- (if (when (> (length name) 0) (char= (char name (1- (length name)))
#\/))
+ (if (when (> (length name) 1) (char= (char name (1- (length name)))
#\/))
(subseq name 0 (1- (length name)))
name)
#-(or :unix :win32)



(1) -> )lisp (|trim_directory_name| "/")

Value = ""

Currently this will make absolute path into relative path unexpectedly.

- Qian

Waldek Hebisch

unread,
Apr 24, 2026, 11:02:58 AM (yesterday) Apr 24
to fricas...@googlegroups.com
Thanks, please commit.
--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages