Don't simplify the directory "./" to the null string.
authorChris Hanson <org/chris-hanson/cph>
Thu, 20 Apr 1989 01:28:01 +0000 (01:28 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 20 Apr 1989 01:28:01 +0000 (01:28 +0000)
v7/src/runtime/pathnm.scm

index ce051f02f30c4aad08d791f01e2d1be31e9bfa57..d67f7264ace9030ca38bde3efa2eb483b57dca8f 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/pathnm.scm,v 14.3 1989/04/05 04:27:38 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/pathnm.scm,v 14.4 1989/04/20 01:28:01 cph Rel $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -287,14 +287,11 @@ See the files unkpth.scm, vmspth.scm, or unxpth.scm for examples.|#
   (if (or (null? directory)
          (not (list? directory)))
       directory
-      (let ((directory (delq 'SELF directory)))
-       (cond ((null? directory)
-              directory)
-             ((eq? (car directory) 'ROOT)
-              (cons 'ROOT
-                    (simplify-tail (simplify-root-tail (cdr directory)))))
-             (else
-              (simplify-tail directory))))))
+      (let ((head (car directory))
+           (tail (delq 'SELF (cdr directory))))
+       (if (eq? head 'ROOT)
+           (cons 'ROOT (simplify-tail (simplify-root-tail tail)))
+           (simplify-tail (cons head tail))))))
 
 (define (simplify-root-tail directory)
   (if (and (not (null? directory))