(Arthur and Jinx:) Add special restarts for open-file errors.
authorArthur Gleckler <edu/mit/csail/zurich/arthur>
Thu, 22 Aug 1991 15:19:05 +0000 (15:19 +0000)
committerArthur Gleckler <edu/mit/csail/zurich/arthur>
Thu, 22 Aug 1991 15:19:05 +0000 (15:19 +0000)
v7/src/runtime/load.scm
v7/src/runtime/pathnm.scm
v7/src/runtime/version.scm
v8/src/runtime/load.scm

index ff23db38998d2f57f4aa12a2cd3c9b9e87d6a803..45053cd64405b16286104ebf2689a2503b346d70 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.23 1991/08/20 22:01:33 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.24 1991/08/22 15:18:02 arthur Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -189,9 +189,9 @@ MIT in each case. |#
                   (pathname->input-truename pathname)
                   (load/default-find-pathname-with-type pathname
                                                         default-types)))))
-       (if (not truename)
-           (error:open-file pathname))
-       truename)))
+       (or truename
+           (find-true-pathname (->pathname (error:open-file pathname))
+                               default-types)))))
 
 (define (search-types-in-order pathname default-types)
   (let loop ((types default-types))
index 2e03e1f3067683fe24f0b1c36872b59b558d9b6f..c7a6f4daabb4852fb259d0f0b3cfa4f4ce411c0b 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/pathnm.scm,v 14.11 1991/02/15 18:06:34 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/pathnm.scm,v 14.12 1991/08/22 15:17:51 arthur Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -340,8 +340,8 @@ See the files unkpth.scm, vmspth.scm, or unxpth.scm for examples.|#
 (define (canonicalize-input-pathname filename)
   (let ((pathname (->pathname filename)))
     (let ((truename (pathname->input-truename pathname)))
-      (if (not truename) (error:open-file pathname))
-      truename)))
+      (or truename
+         (canonicalize-input-pathname (error:open-file pathname))))))
 
 (define (pathname->input-truename pathname)
   (let ((pathname (pathname->absolute-pathname pathname))
@@ -425,11 +425,15 @@ See the files unkpth.scm, vmspth.scm, or unxpth.scm for examples.|#
 (define library-directory-path)
 
 (define (system-library-pathname pathname)
-  (let loop ((directories library-directory-path))
-    (if (null? directories)
-       (error:open-file pathname))
-    (or (pathname->input-truename (merge-pathnames pathname (car directories)))
-       (loop (cdr directories)))))
+  (if (and (pathname-absolute? pathname)
+          (pathname->input-truename pathname))
+      pathname
+      (let loop ((directories library-directory-path))
+       (if (null? directories)
+           (system-library-pathname (->pathname (error:open-file pathname)))
+           (or (pathname->input-truename
+                (merge-pathnames pathname (car directories)))
+               (loop (cdr directories)))))))
 
 (define (system-library-directory-pathname pathname)
   (if (not pathname)
index 68abe0f4737a66fe053d3875cd48e9512282e3d5..f7bf87aaee77dbb77968a5147e453f912bb0ee63 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.133 1991/08/16 15:42:30 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.134 1991/08/22 15:19:05 arthur Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -45,7 +45,7 @@ MIT in each case. |#
                     '()))
   (add-system! microcode-system)
   (add-event-receiver! event:after-restore snarf-microcode-version!)
-  (add-identification! "Runtime" 14 133))
+  (add-identification! "Runtime" 14 134))
 
 (define microcode-system)
 
index 059050707c0b367df6e6e45394b2e1c1f8e2afc1..c87100dce1e5e7d51fd6f3728dd38e3aa81608da 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.23 1991/08/20 22:01:33 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.24 1991/08/22 15:18:02 arthur Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -189,9 +189,9 @@ MIT in each case. |#
                   (pathname->input-truename pathname)
                   (load/default-find-pathname-with-type pathname
                                                         default-types)))))
-       (if (not truename)
-           (error:open-file pathname))
-       truename)))
+       (or truename
+           (find-true-pathname (->pathname (error:open-file pathname))
+                               default-types)))))
 
 (define (search-types-in-order pathname default-types)
   (let loop ((types default-types))