X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcold%2Fshared.lisp;h=b2dc2906f54bbb3f9559922e22820508b07fd382;hb=5edd74f6911093805a009a152b32216b3dba59f7;hp=7fcb851e448b09302110c068c015e3aa169a9cc9;hpb=6e7e59adb6f6c30f84b31695b48cb51e2c519d75;p=sbcl.git diff --git a/src/cold/shared.lisp b/src/cold/shared.lisp index 7fcb851..b2dc290 100644 --- a/src/cold/shared.lisp +++ b/src/cold/shared.lisp @@ -107,20 +107,16 @@ ;;; COMPILE-STEM function above. -- WHN 19990321 (defun rename-file-a-la-unix (x y) - ;; CLISP signals an error when the target file exists, which - ;; seems unjustified by the ANSI definition of RENAME-FILE. - ;; Work around it. - #+clisp (ignore-errors (delete-file y)) - - (rename-file x - ;; (Note that the TRUENAME expression here is lifted - ;; from an example in the ANSI spec for TRUENAME.) - (with-open-file (stream y :direction :output) - (close stream) - ;; From the ANSI spec: "In this case, the file is - ;; closed when the truename is tried, so the truename - ;; information is reliable." - (truename stream)))) + (let ((path ;; (Note that the TRUENAME expression here is lifted from an + ;; example in the ANSI spec for TRUENAME.) + (with-open-file (stream y :direction :output) + (close stream) + ;; From the ANSI spec: "In this case, the file is closed + ;; when the truename is tried, so the truename + ;; information is reliable." + (truename stream)))) + (delete-file path) + (rename-file x path))) (compile 'rename-file-a-la-unix) ;;; a wrapper for compilation/assembly, used mostly to centralize