DRAFT mes: Fix basename.
* mes/module/mes/posix.mes (basename): Take first element instead of last.
This commit is contained in:
parent
c673b5cc37
commit
05b9103552
|
@ -26,7 +26,7 @@
|
|||
(define S_IRWXU #o700)
|
||||
|
||||
(define (basename file-name . ext)
|
||||
(let ((base (last (string-split file-name #\/)))
|
||||
(let ((base (car (last-pair (string-split file-name #\/))))
|
||||
(ext (and (pair? ext) (car ext))))
|
||||
(if (and ext
|
||||
(string-suffix? ext base)) (string-drop-right base (string-length ext))
|
||||
|
|
Loading…
Reference in New Issue