Luke Gorrie luke@bluetail.com writes:
But surely the pathname of a directory can be extended to refer to a file in a portable way. Anyone know the right way? (Hi Christophe! :-)
The right way would be using logical-pathnames, but the problem is at least here the . in .swank-somewhat so not using a dot would help.
I'm not sure if that really is a bug or a missing specification. On LispWorks I can do a: (translate-logical-pathname "clb:.test")
but on CMUCL this is broken Parse error in namestring: Expecting a file name, got #.. clb:.test ^ [Condition of type COMMON-LISP::NAMESTRING-PARSE-ERROR]
Restarts: 0: [ABORT] Return to Slime toplevel. 1: [ABORT] Return to Top-Level.
Backtrace: 0: (COMMON-LISP::EXPECTING "a file name" ((#. . 4) ("TEST" . 5))) 1: (COMMON-LISP::PARSE-DIRECTORY ((#. . 4) ("TEST" . 5))) 2: (COMMON-LISP::PARSE-LOGICAL-NAMESTRING "clb:.test" 0 9) 3: (COMMON-LISP::%PARSE-NAMESTRING "clb:.test" NIL #p"" 0 ...) 4: (COMMON-LISP::%PARSE-NAMESTRING 6 "clb:.test" NIL #p"" ...)[:EXTERNAL] 5: (PATHNAME "clb:.test")
I guess I will ask in c.l.l and see what they say about that.
Regards Friedrich