-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improper handling of pathname-name for dotfiles #521
Comments
If anything, CL-USER> (make-pathname :directory '(:absolute "foo" "bar") :name ".baz")
#P"/foo/bar/\\.baz" So the issue is in how CCL parses and prints unix-like namestrings differently than other implementations (note the extra slash in the namestring; IIUC it is there to show that the dot is a part of the name, not the type) and not in how an already cooked pathname works with regards to Maybe the TODO at Line 1004 in 24c2552
|
I sincerely don't know what the right thing is. An older LispWorks I have installed says
The comment by @phoe shows an instance of CCL's namestring quoting. To be honest, I've been wondering for a long time whether CCL should stop doing this. See #42. |
On the other hand, LW 8.0.1 Personal says: CL-USER 1 > (describe (make-pathname :directory '(:absolute "foo" "bar") :name ".baz"))
#P"/foo/bar/.baz" is a PATHNAME
HOST NIL
DEVICE NIL
DIRECTORY (:ABSOLUTE "foo" "bar")
NAME ".baz"
TYPE NIL
VERSION NIL
CL-USER 2 > (describe (make-pathname :directory '(:absolute "foo" "bar") :type "baz"))
#P"/foo/bar/.baz" is a PATHNAME
HOST NIL
DEVICE NIL
DIRECTORY (:ABSOLUTE "foo" "bar")
NAME NIL
TYPE "baz"
VERSION NIL Notice the ambiguous namestring. |
You mention LW 8.0.1 Personal, so perhaps you’re only interested in implementation specific behavior, but note that a dot in a pathname component is NOT conforming.
Even lower case is dubious; it can be acceptable when :case :local is assumed, but it then depends on the underlying file systems.
For example, no implementation implement :case :local correctly IMO, since none take into account the customary case of the file system where the component is stored, taking into account that you can mount file system on file systems, so the customary case can be different for different components of the same pathname!
If you want to use maximally portable and conforming logical pathnames, use only uppercase ASCII letters and digits and the underline character in component names. (Note: even the dash is not maximally portable and conforming!)
… On 15 Oct 2024, at 21:39, phoe ***@***.***> wrote:
On the other hand, LW 8.0.1 Personal says:
CL-USER 1 > (describe (make-pathname :directory '(:absolute "foo" "bar") :name ".baz"))
#P"/foo/bar/.baz" is a PATHNAME
HOST NIL
DEVICE NIL
DIRECTORY (:ABSOLUTE "foo" "bar")
NAME ".baz"
TYPE NIL
VERSION NIL
CL-USER 2 > (describe (make-pathname :directory '(:absolute "foo" "bar") :type ".baz"))
#P"/foo/bar/..baz" is a PATHNAME
HOST NIL
DEVICE NIL
DIRECTORY (:ABSOLUTE "foo" "bar")
NAME NIL
TYPE ".baz"
VERSION NIL
Notice the double period in the namestring.
—
Reply to this email directly, view it on GitHub <#521 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAGBJDD7N3MC626VFUN7LFLZ3VVOFAVCNFSM6AAAAABPREJX76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJUHA2TONBVGU>.
You are receiving this because you are subscribed to this thread.
|
A test case is as follows:
This causes an incorrect result from
uiop:hidden-pathname-p
. (see: https://gitlab.common-lisp.net/asdf/asdf/-/blob/master/uiop/pathname.lisp#L257)I don't claim that this is in violation of the standard, but it seems to be the opposite interpretation to all three other implementations I tested: clisp, ecl, and sbcl.
The text was updated successfully, but these errors were encountered: