0.9.13.3:
authorChristophe Rhodes <csr21@cam.ac.uk>
Sun, 28 May 2006 10:22:22 +0000 (10:22 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Sun, 28 May 2006 10:22:22 +0000 (10:22 +0000)
Fix for bug reported by Pascal Bourguignon sbcl-help 2006-05-22
"cannot take the namestring of a logical pathname"
... be more careful before applying sequence functions to
pathname components.
... test case.

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

diff --git a/NEWS b/NEWS
index a92dd40..f97afdb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 ;;;; -*- coding: utf-8; -*-
 changes in sbcl-0.9.14 relative to sbcl-0.9.13:
+  * bug fix: unparsing logical pathnames with :NAME :WILD :TYPE NIL
+    failed with a type error.  (reported by Pascal Bourguignon)
   * fixed some bugs revealed by Paul Dietz' test suite:
     ** MISC.641: LET-conversion were not supposed to work in late
        compilation stages.
index f39c285..d8dd557 100644 (file)
@@ -1551,13 +1551,15 @@ PARSE-NAMESTRING."
            (version-supplied (not (or (null version)
                                       (eq version :unspecific)))))
       (when name
-        (when (and (null type) (position #\. name :start 1))
+        (when (and (null type)
+                   (typep name 'string)
+                   (position #\. name :start 1))
           (error "too many dots in the name: ~S" pathname))
         (strings (unparse-logical-piece name)))
       (when type-supplied
         (unless name
           (error "cannot specify the type without a file: ~S" pathname))
-        (when (typep type 'simple-string)
+        (when (typep type 'string)
           (when (position #\. type)
             (error "type component can't have a #\. inside: ~S" pathname)))
         (strings ".")
index ae1745f..891c589 100644 (file)
 (let ((pathname (truename "/")))
   (assert (equalp pathname #p"/"))
   (assert (equal (pathname-directory pathname) '(:absolute))))
+\f
+;;; we failed to unparse logical pathnames with :NAME :WILD :TYPE NIL.
+;;; (Reported by Pascal Bourguignon.
+(let ((pathname (make-pathname :host "SYS" :directory '(:absolute :wild-inferiors)
+                               :name :wild :type nil)))
+  (assert (string= (namestring pathname) "SYS:**;*"))
+  (assert (string= (write-to-string pathname :readably t) "#P\"SYS:**;*\"")))
 
 ;;;; success
index 55fda2e..73d397e 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.2"
+"0.9.13.3"