1.0.28.41: make MAKE-ARRAY transforms co-operate with FILL better
[sbcl.git] / src / code / win32-pathname.lisp
index f904d6e..a3770fe 100644 (file)
                (unparse-win32-file pathname)))
 
 (defun unparse-native-win32-namestring (pathname as-file)
-  (declare (type pathname pathname))
+  (declare (type pathname pathname)
+           ;; Windows doesn't like directory names with trailing slashes.
+           (ignore as-file))
   (let* ((device (pathname-device pathname))
          (directory (pathname-directory pathname))
          (name (pathname-name pathname))
          (type (pathname-type pathname))
          (type-present-p (typep type '(not (member nil :unspecific))))
          (type-string (if type-present-p type "")))
-    (when name-present-p
-      (setf as-file nil))
     (coerce
      (with-output-to-string (s)
        (when device
          (write-string device s)
          (write-char #\: s))
        (tagbody
-          (ecase (pop directory)
-            (:absolute (write-char #\\ s))
-            (:relative))
+          (when directory
+            (ecase (pop directory)
+              (:absolute (write-char #\\ s))
+              (:relative)))
           (unless directory (go :done))
         :subdir
           (let ((piece (pop directory)))
               (string (write-string piece s))
               (t (error "ungood directory segment in NATIVE-NAMESTRING: ~S"
                         piece)))
-            (when (or directory (not as-file))
+            (when (or directory name)
               (write-char #\\ s)))
           (when directory
             (go :subdir))