From 70cf57036ad49cf3a939b984e112651148d20410 Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Thu, 1 Apr 2004 17:48:37 +0000 Subject: [PATCH] Helmut Eller notes on cmucl-imp on 2004-04-24 that (delete-file (open "/tmp/tmp-file" :direction :output :if-does-not-exist :create :if-exists :supersede)) signals an error because delete-file is unlinking the file twice, because CLOSE is called with the option :ABORT T. Don't do that, so that any reversion of the file isn't done, and we file is deleted. --- code/filesys.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/filesys.lisp b/code/filesys.lisp index e7321ac5f..e3ca007f9 100644 --- a/code/filesys.lisp +++ b/code/filesys.lisp @@ -6,7 +6,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/filesys.lisp,v 1.78 2004/01/09 15:09:27 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/filesys.lisp,v 1.79 2004/04/01 17:48:37 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -838,7 +838,9 @@ "Delete the specified file." (let ((namestring (unix-namestring file t))) (when (streamp file) - (close file :abort t)) + ;; Close the file, but don't try to revert or anything. We want + ;; to delete it, man! + (close file)) (unless namestring (error 'simple-file-error :pathname file -- GitLab