Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Eric Timmons
asdf
Commits
7f1d4ffc
Commit
7f1d4ffc
authored
Nov 24, 2020
by
Robert Goldman
Browse files
Fix for issue 49.
Fix logic of invoking AFTER thunk.
parent
0fd4c2e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
uiop/stream.lisp
View file @
7f1d4ffc
...
...
@@ -629,11 +629,16 @@ Finally, the file will be deleted, unless the KEEP argument when CALL-FUNCTION'e
(
if
want-pathname-p
(
funcall
thunk
stream
pathname
)
(
funcall
thunk
stream
)))))))
(
cond
((
not
okp
)
nil
)
(
after
(
return
(
call-function
after
okp
)))
((
and
want-pathname-p
(
not
want-stream-p
))
(
return
(
call-function
thunk
okp
)))
(
t
(
return
(
values-list
results
)))))
;; if we don't want a stream, then we must call the thunk *after*
;; the stream is closed, but only if it was successfully opened.
(
when
okp
(
when
(
and
want-pathname-p
(
not
want-stream-p
))
(
setf
results
(
multiple-value-list
(
funcall
thunk
okp
))))
;; if the stream was successfully opened, then return a value,
;; either one computed already, or one from AFTER, if that exists.
(
if
after
(
return
(
call-function
after
pathname
))
(
return
(
values-list
results
)))))
(
when
(
and
okp
(
not
(
call-function
keep
)))
(
ignore-errors
(
delete-file-if-exists
okp
))))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment