0.9.13.31: native-namestring bugfix
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 7 Jun 2006 09:49:54 +0000 (09:49 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 7 Jun 2006 09:49:54 +0000 (09:49 +0000)
 * The native-namestring should be same for :DIRECTORY (:RELATIVE) and
   NIL.

src/code/unix-pathname.lisp
tests/pathnames.impure.lisp
version.lisp-expr

index 6f1cf6a..302fce0 100644 (file)
         (type (pathname-type pathname)))
     (coerce
      (with-output-to-string (s)
-       (ecase (car directory)
-         (:absolute (write-char #\/ s))
-         (:relative))
+       (when directory
+         (ecase (car directory)
+           (:absolute (write-char #\/ s))
+           (:relative)))
        (dolist (piece (cdr directory))
          (typecase piece
            ((member :up) (write-string ".." s))
index 86bf11b..6993c55 100644 (file)
       (p2 (make-pathname :directory '(:relative :back "foo"))))
   (assert (equal (merge-pathnames p1 p2)
                  (make-pathname :directory '(:relative :back "foo" "bar")))))
+
+;;; construct native namestrings even if the directory is empty (means
+;;; that same as if (:relative))
+(assert (equal (sb-ext:native-namestring (make-pathname :directory '(:relative)
+                                                        :name "foo"
+                                                        :type "txt"))
+               (sb-ext:native-namestring (let ((p (make-pathname :directory nil
+                                                                 :name "foo"
+                                                                 :type "txt")))
+                                           (assert (not (pathname-directory p)))
+                                           p))))
+
 \f
 ;;;; success
index c0ec8dc..1091375 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.13.30"
+"0.9.13.31"