projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More meaningful error message for OPEN :IF-EXISTS :NEW-VERSION
[sbcl.git]
/
src
/
code
/
fd-stream.lisp
diff --git
a/src/code/fd-stream.lisp
b/src/code/fd-stream.lisp
index
cae969d
..
acf84b0
100644
(file)
--- a/
src/code/fd-stream.lisp
+++ b/
src/code/fd-stream.lisp
@@
-2370,7
+2370,12
@@
(ensure-one-of if-does-not-exist
'(:error :create nil)
:if-does-not-exist)
(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
(setf mask (logior mask sb!unix:o_creat)))
((not (member if-exists '(:error nil))))
;; Both if-does-not-exist and if-exists now imply