From cf2e640eb50e7ae1cb301e9e20b2dac859c21c38 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Fri, 18 Sep 2009 10:36:57 +0000 Subject: [PATCH] 1.0.31.14: removing :DEFAULT-INITARGS via DEFCLASS * If a DEFCLASS is executed without :DEFAULT-INITARGS, pass :DIRECT-DEFAULT-INITARGS NIL to ENSURE-CLASS. AMOP specifies defaulting direct default initargs for reinitialization using existing CLASS-DIRECT-DEFAULT-INITARGS, but there is no requirement for DEFCLASS to preserve them, and doing that seems quite undesirable -- though I cannot find a requirement from CLHS for removing them either. --- NEWS | 2 ++ src/code/filesys.lisp | 2 +- tests/pathnames.impure.lisp | 13 +++++++++++++ version.lisp-expr | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a9776b0..7b5d25d 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ changes relative to sbcl-1.0.31 by David Vázquez) * improvement: better error signalling for bogus parameter specializer names in DEFMETHOD forms (reported by Pluijzer) + * bug fix: DELETE-FILE once again works on logical pathnames (regression + since 1.0.30.49) * bug fix: redefinition of a class via DEFCLASS without :DEFAULT-INITARGS removes previous default initargs (reported by Lars Rune Nøstdal and Samium Gromoff) diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index e5bda9e..cd62fa6 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -477,7 +477,7 @@ If FILE is a stream, on Windows the stream is closed immediately. On Unix plaforms the stream remains open, allowing IO to continue: the OS resources associated with the deleted file remain available till the stream is closed as per standard Unix unlink() behaviour." - (let* ((pathname (pathname file)) + (let* ((pathname (translate-logical-pathname file)) (namestring (native-namestring pathname :as-file t))) (truename file) ; for error-checking side-effect #!+win32 diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index a46c6e0..54ad01a 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -457,4 +457,17 @@ #|:UNSPECIFIC|# "C:\\tmp\\" "C:\\tmp\\" NIL NIL #|"" |# "C:\\tmp\\" "C:\\tmp\\" "C:\\tmp\\." "C:\\tmp\\.a" #|"a" |# "C:\\tmp\\a" "C:\\tmp\\a" "C:\\tmp\\a." "C:\\tmp\\a.a"))) + +(with-test (:name :delete-file-logical-pathname) + (setf (logical-pathname-translations "SB-TEST") + (list (list "**;*.*.*" (make-pathname :name :wild + :type :wild + :defaults (truename "."))))) + (let ((test (pathname "SB-TEST:delete-logical-pathname.tmp"))) + (assert (typep test 'logical-pathname)) + (with-open-file (f test :direction :output) + (write-line "delete me!" f)) + (assert (probe-file test)) + (assert (delete-file test)) + (assert (not (probe-file test))))) ;;;; success diff --git a/version.lisp-expr b/version.lisp-expr index 4393683..dc135d0 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".) -"1.0.31.14" +"1.0.31.15" -- 1.7.10.4