resolve-file-name removes a trailing slash, if present, but this is not documented.
I think that it is the wrong behaviour anyway, i.e. that it shouldn't remove trailing slashes.
This, in turn, creates bugs in functions that use resolve-file-name but put some semantics in a trailing slash, like for example the library path stuff: A trailing slash in SCSH_LIB_DIRS gets ignored, instead of enabling recursive search. If you decide to keep the current resolve-file-name behaviour, please fix these places. You'll probably want to give users a function that does ~-expansion / relative-to-absolute conversion without removing trailing slashes, too.
@@ -169,8 +169,7 @@
(define (resolve-file-name fname . maybe-root)
- (let* ((root (ensure-file-name-is-nondirectory (:optional maybe-root ".")))
- (fname (ensure-file-name-is-nondirectory fname)))
+ (let* ((root (:optional maybe-root ".")))
(if (zero? (string-length fname))
(let ((c (string-ref fname 0)))