Opened 4 years ago

Last modified 4 years ago

#1328 new enhancement

probe-file returns paths without pathname name

Reported by: fare Owned by:
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:

Description

Somewhat unusually compared to most other implementations, .bashrc is normalized to a pathname with an empty name. lispworks and gcl agree, but all other implementations disagree. Is that by design or is it a bug? In either case, I suppose the choice should be documented somewhere, though I can't say where.

(describe (probe-file (make-pathname :name ".bashrc")))
#P"/home/tunes/.bashrc"
Type: PATHNAME
Class: #<BUILT-IN-CLASS PATHNAME>
TYPE: (PATHNAME . #<CCL::CLASS-WRAPPER PATHNAME #x30004003FB1D>)
%PATHNAME-DIRECTORY: (:ABSOLUTE "home" "tunes")
%PATHNAME-NAME: NIL
%PATHNAME-TYPE: "bashrc"
%PHYSICAL-PATHNAME-VERSION: NIL
%PHYSICAL-PATHNAME-DEVICE: NIL

Change History (2)

comment:1 Changed 4 years ago by svspire

Somewhat related to Ticket #1071.

comment:2 Changed 4 years ago by rme

http://ccl.clozure.com/docs/ccl.html#pathname-namestrings talks about the issue, but it doesn't describe what the implementation actually does. I agree that it would be good to state the exact rules (whatever they are).

As a semi-related note, there's been some talk for a long time that the whole matter of quoting dots in namestrings (in order to remove potential ambiguity in how dots in namestrings separate the name and type of the pathname) may be worth dropping (see ticket:632).

Note: See TracTickets for help on using tickets.