Ignore:
Timestamp:
03/24/14 16:39:23 (3 years ago)
Author:
mevenson
Message:

Fix Uniform Naming Convention (aka "UNC" or "network") paths under Windows.

DIRECTORY now works again on UNC paths.

UNC paths may be either specified with either back slash (#
) or
forward slash (#\/) doubled as the first character in a Pathname
namestring.

The patterns in

<server>/<share>/[directories-and-files]

are parsed as

<server> is stored as HOST.

<share> is stored as DEVICE.

[directories-and-files] gets parsed as per the normal rules under
Windows.

Mixing namestrings with both backslash and slash characters can lead
to unpredictable results. It is recommended not to use backslash
characters in namestrings if it can be avoided. The pathname printed
representation is always normalized to using forward slash delimiters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/directory.lisp

    r14624 r14659  
    122122              (when (and namestring (> (length namestring) 0))
    123123                (when (featurep :windows)
    124                   (let ((device (pathname-device pathname)))
    125                     (when device
    126                       (setq namestring (concatenate 'string device ":" namestring)))))
     124                  (let ((host (pathname-host pathname))
     125                        (device (pathname-device pathname)))
     126                    (cond
     127                      ((and host device)
     128                       (setq namestring
     129                             (concatenate 'string "//" host "/" device  namestring)))
     130                      (device
     131                       (setq namestring
     132                             (concatenate 'string device ":" namestring))))))
    127133                (let ((entries (list-directories-with-wildcards
    128134                                namestring nil resolve-symlinks))
Note: See TracChangeset for help on using the changeset viewer.