From 70e055c5da9b04791d78404ca67ae536155ffaa5 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 14 Mar 1989 02:18:01 +0000 Subject: [PATCH] Change `delete-file' to return #F if the file does not exist, instead of signalling an error. --- v7/src/runtime/sfile.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/v7/src/runtime/sfile.scm b/v7/src/runtime/sfile.scm index 72ec44ea5..f50495b44 100644 --- a/v7/src/runtime/sfile.scm +++ b/v7/src/runtime/sfile.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/sfile.scm,v 14.2 1988/08/05 20:49:04 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/sfile.scm,v 14.3 1989/03/14 02:18:01 cph Rel $ -Copyright (c) 1988 Massachusetts Institute of Technology +Copyright (c) 1988, 1989 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -46,7 +46,11 @@ MIT in each case. |# (canonicalize-output-filename to))) (define (delete-file name) - ((ucode-primitive remove-file) (canonicalize-input-filename name))) + (let ((truename (pathname->input-truename (->pathname name)))) + (and truename + (begin + ((ucode-primitive remove-file) (pathname->string truename)) + true)))) (define (transcript-on filename) (if (not ((ucode-primitive photo-open) -- 2.25.1