From b12ec470fb784fd5cc644abac723cd2b7f286571 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 20 Apr 1989 01:28:01 +0000 Subject: [PATCH] Don't simplify the directory "./" to the null string. --- v7/src/runtime/pathnm.scm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/v7/src/runtime/pathnm.scm b/v7/src/runtime/pathnm.scm index ce051f02f..d67f7264a 100644 --- a/v7/src/runtime/pathnm.scm +++ b/v7/src/runtime/pathnm.scm @@ -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)) -- 2.25.1