UIOP:UNIX-NAMESTRING loses UNC path information on Allegro

Bug #1401083 reported by Luís Oliveira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Invalid
Undecided
Unassigned

Bug Description

CL-USER> #P"\\\\host\\share\\path\\to\\file.ext"
#P"\\\\host\\share\\path\\to\\file.ext"

CL-USER> (describe *)
; No value
#P"\\\\host\\share\\path\\to\\file.ext" is a structure of type
PATHNAME. It has these slots:
  EXCL::HOST "host"
  EXCL::DEVICE "share"
  DIRECTORY (:ABSOLUTE "path" "to")
  EXCL::NAME "file"
  TYPE "ext"
  EXCL::VERSION :UNSPECIFIC
  NAMESTRING "\\\\host\\share\\path\\to\\file.ext"
  EXCL::HASH NIL
  EXCL::DIR-NAMESTRING "\\path\\to\\"
  EXCL::PLIST NIL

CL-USER> (uiop:unix-namestring **)
"/path/to/file.ext"

;; I was expecting "//host/share/path/to/file.ext" at this point.

CL-USER> (lisp-implementation-version)
"9.0 [64-bit Windows] (Aug 13, 2014 17:16)"
("lisp_build 66")

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

Here is the docsctring for UNIX-NAMESTRING:

    "Given a non-wild PATHNAME, return a Unix-style namestring for it.
If the PATHNAME is NIL or a STRING, return it unchanged.

This only considers the DIRECTORY, NAME and TYPE components of the pathname.
This is a portable solution for representing relative pathnames,
But unless you are running on a Unix system, it is not a general solution
to representing native pathnames.

An error is signaled if the argument is not NULL, a STRING or a PATHNAME,
or if it is a PATHNAME but some of its components are not recognized."

So I'm afraid UIOP:UNIX-NAMESTRING is simply the wrong function to do what you want.

I will close this as INVALID, unless you would like to turn it into a feature request for a new function that WILL do what you want. If so, please add a comment with a specification for the function you would like to see.

Revision history for this message
Luís Oliveira (luismbo) wrote :

Oh, OK. Definitely should have read the docstring. Sorry about that. In my specific case, I think I want something more along the lines of NATIVE-NAMESTRING but with forward rather than backslashes which I can easily implement and I don't it is something generally useful. I've marked the bug invalid. Thanks for your quick response!

Changed in asdf:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.