than a single word.
* bug fix: contribs couldn't be built on Windows with MinGW.
* bug fix: Better pathname handling on Windows. (lp#922117)
+ * bug fix: OPEN reports a more meaningful error when an existing file is
+ opened for output with :if-exists :new-version. Thanks to Philip
+ Munksgaard. (lp#455381)
changes in sbcl-1.1.13 relative to sbcl-1.1.12:
* optimization: better distribution of SXHASH over small conses of related
(ensure-one-of if-does-not-exist
'(:error :create nil)
:if-does-not-exist)
- (cond ((eq if-does-not-exist :create)
+ (cond ((and if-exists-given
+ truename
+ (eq if-exists :new-version))
+ (open-error "OPEN :IF-EXISTS :NEW-VERSION is not supported ~
+ when a new version must be created."))
+ ((eq if-does-not-exist :create)
(setf mask (logior mask sb!unix:o_creat)))
((not (member if-exists '(:error nil))))
;; Both if-does-not-exist and if-exists now imply
(assert (not
(do-open t nil nil :io)))
(assert (raises-error? (do-open t :error :error :io)))))
+
+(with-test (:name :open-new-version)
+ (multiple-value-bind (value error)
+ (ignore-errors (open #.(or *compile-file-truename* *load-truename*)
+ :direction :output
+ :if-exists :new-version))
+ (assert (not value))
+ (assert error)
+ (assert (equal (simple-condition-format-control error)
+ "OPEN :IF-EXISTS :NEW-VERSION is not supported ~
+ when a new version must be created."))))