Change `delete-file' to return #F if the file does not exist, instead
authorChris Hanson <org/chris-hanson/cph>
Tue, 14 Mar 1989 02:18:01 +0000 (02:18 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 14 Mar 1989 02:18:01 +0000 (02:18 +0000)
of signalling an error.

v7/src/runtime/sfile.scm

index 72ec44ea534c5b55dffd1874d0a62a256dc159aa..f50495b44ed9eace34b0bb27bda9113794af7fbe 100644 (file)
@@ -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)