Bugs item #885631, was opened at 2004-01-27 17:45
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110493&aid=885631&group_id=10493
Category: run-time
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Schoinobates Volans (schoinobates)
Assigned to: Nobody/Anonymous (nobody)
Summary: resolve-file-name removes trailing /
Initial Comment:
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.
--- scsh-0.6.5.orig/scsh/fname.scm
+++ scsh-0.6.5/scsh/fname.scm
@@ -169,8 +169,7 @@
fname)))
(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)))
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110493&aid=885631&group_id=10493
|