* bug fix: obviously wrong type specifiers such as (FIXNUM 1) or
(CHARACTER 10) are now reported as errors, rather than propagated
as unknown types. (reported by piso on #lisp)
+ * bug fix: the :IF-EXISTS argument to OPEN now behaves correctly
+ with values NIL and :ERROR. (thanks to Milan Zamazal)
* compiler enhancement: SIGNUM is now better able to derive the type
of its result.
* fixed some bugs revealed by Paul Dietz' test suite:
(open-error "~@<The path ~2I~_~S ~I~_does not exist.~:>"
pathname))
(t nil)))
- ((and (eql errno sb!unix:eexist) if-exists)
+ ((and (eql errno sb!unix:eexist) (null if-exists))
nil)
(t
(vanilla-open-error)))))))))
(merged-pathname (merge-pathnames pathname)))
(!enumerate-matches (match merged-pathname)
(let* ((*ignore-wildcards* t)
- (truename (truename match)))
- (setf (gethash (namestring truename) truenames)
- truename)))
+ ;; FIXME: Why not TRUENAME? As reported by Milan Zamazal
+ ;; sbcl-devel 2003-10-05, using TRUENAME causes a race
+ ;; condition whereby removal of a file during the
+ ;; directory operation causes an error. It's not clear
+ ;; what the right thing to do is, though. -- CSR,
+ ;; 2003-10-13
+ (truename (probe-file match)))
+ (when truename
+ (setf (gethash (namestring truename) truenames)
+ truename))))
(mapcar #'cdr
;; Sorting isn't required by the ANSI spec, but sorting
;; into some canonical order seems good just on the
(assert (= (read-byte s) -1)))
(delete-file p))
\f
+;;; :IF-EXISTS got :ERROR and NIL the wrong way round (reported by
+;;; Milan Zamazal)
+(let* ((p "this-file-will-exist")
+ (stream (open p :direction :output :if-exists :error)))
+ (assert (null (with-open-file (s p :direction :output :if-exists nil) s)))
+ (assert (raises-error?
+ (with-open-file (s p :direction :output :if-exists :error))))
+ (close stream)
+ (delete-file p))
+\f
;;; success
(quit :unix-status 104)
;;; 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.8.4.20"
+"0.8.4.21"