From 01cf051cdcd6ff3508a115dfc7ae9c864bd5a376 Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Mon, 28 Apr 2014 16:16:18 -0400
Subject: [PATCH] Fix yet another bug in with-temporary-file, found while
 extending lisp-invocation.

---
 uiop/stream.lisp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/uiop/stream.lisp b/uiop/stream.lisp
index 1590b71c..bd0f8c31 100644
--- a/uiop/stream.lisp
+++ b/uiop/stream.lisp
@@ -627,7 +627,7 @@ Upon success, the KEEP form is evaluated and the file is is deleted unless it ev
     (check-type pathname symbol)
     (assert (or streamp pathnamep))
     (let* ((afterp (position :close-stream body))
-           (before (if afterp (subseq body 0 (1- afterp)) body))
+           (before (if afterp (subseq body 0 afterp) body))
            (after (when afterp (subseq body (1+ afterp))))
            (beforef (gensym "BEFORE"))
            (afterf (gensym "AFTER")))
@@ -647,7 +647,7 @@ Upon success, the KEEP form is evaluated and the file is is deleted unless it ev
           ,@(when suffix `(:suffix ,suffix))
           ,@(when type `(:type ,type))
           ,@(when keep `(:keep ,keep))
-          ,@(when after `(:after `#',afterf))
+          ,@(when after `(:after #',afterf))
           ,@(when element-type `(:element-type ,element-type))
           ,@(when external-format `(:external-format ,external-format))))))
 
-- 
GitLab