Skip to content
Snippets Groups Projects
Commit 70cf5703 authored by rtoy's avatar rtoy
Browse files

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.
parent 0519cdf6
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment