From a02c31dc76ffa8ae4f014cd01be7ffe9e47113be Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Thu, 9 Nov 2006 20:34:30 +0000 Subject: [PATCH] 0.9.18.42: TRANSLATE-PATHNAME was selecting the version component from FROM-WILDCARD rather than SOURCE. (Reported by Josip Gracin, apparently causing trouble for cl-darcs). --- NEWS | 2 ++ src/code/target-pathname.lisp | 5 +++-- tests/pathnames.impure.lisp | 15 +++++++++++++++ version.lisp-expr | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 950ae47..8d491e7 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ changes in sbcl-0.9.19 (1.0.0?) relative to sbcl-0.9.18: * bug fix: fix thread-safety problems in the type system (generally manifesting as nonsensical errors like "STRING is a bad type specifier for sequences" or "The value 1 is not of type FIXNUM") + * bug fix: version components are handled correctly in TRANSLATE-PATHNAME + (reported by Josip Gracin) * Improvements to the Windows port: ** floating point exceptions are now reported correctly. ** stack exhaustion detection works partially. diff --git a/src/code/target-pathname.lisp b/src/code/target-pathname.lisp index 33f4d8d..6f8f1a0 100644 --- a/src/code/target-pathname.lisp +++ b/src/code/target-pathname.lisp @@ -1270,8 +1270,9 @@ PARSE-NAMESTRING." (frob %pathname-name) (frob %pathname-type) (if (eq from-host *unix-host*) - (if (eq (%pathname-version to) :wild) - (%pathname-version from) + (if (or (eq (%pathname-version to) :wild) + (eq (%pathname-version to) nil)) + (%pathname-version source) (%pathname-version to)) (frob %pathname-version))))))))) diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index 927f288..945d25f 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -410,4 +410,19 @@ (enough-namestring #p".a*") + +(assert (eq 99 + (pathname-version + (translate-pathname + (make-pathname :name "foo" :type "bar" :version 99) + (make-pathname :name :wild :type :wild :version :wild) + (make-pathname :name :wild :type :wild :version :wild))))) + +(assert (eq 99 + (pathname-version + (translate-pathname + (make-pathname :name "foo" :type "bar" :version 99) + (make-pathname :name :wild :type :wild :version :wild) + (make-pathname :name :wild :type :wild :version nil))))) + ;;;; success diff --git a/version.lisp-expr b/version.lisp-expr index 71d0b42..3550adb 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.18.41" +"0.9.18.42" -- 1.7.10.4