1.0.31.14: removing :DEFAULT-INITARGS via DEFCLASS
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 18 Sep 2009 10:36:57 +0000 (10:36 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Fri, 18 Sep 2009 10:36:57 +0000 (10:36 +0000)
 * 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
src/code/filesys.lisp
tests/pathnames.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index a9776b0..7b5d25d 100644 (file)
--- 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)
index e5bda9e..cd62fa6 100644 (file)
@@ -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
index a46c6e0..54ad01a 100644 (file)
 #|: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
index 4393683..dc135d0 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".)
-"1.0.31.14"
+"1.0.31.15"