From: Christophe Rhodes Date: Sun, 28 May 2006 10:22:22 +0000 (+0000) Subject: 0.9.13.3: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=6cb4f9ea3f4e35a5a8e75922833e14575ae92180;p=sbcl.git 0.9.13.3: 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. --- diff --git a/NEWS b/NEWS index a92dd40..f97afdb 100644 --- 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. diff --git a/src/code/target-pathname.lisp b/src/code/target-pathname.lisp index f39c285..d8dd557 100644 --- a/src/code/target-pathname.lisp +++ b/src/code/target-pathname.lisp @@ -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 ".") diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index ae1745f..891c589 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -362,5 +362,12 @@ (let ((pathname (truename "/"))) (assert (equalp pathname #p"/")) (assert (equal (pathname-directory pathname) '(:absolute)))) + +;;; 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 diff --git a/version.lisp-expr b/version.lisp-expr index 55fda2e..73d397e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"