From 8cb4d70528f439b71efbecc6bd2e3f7aa3029303 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 13 Jan 1993 09:53:15 +0000 Subject: [PATCH] (DIRECTORY-PATHNAME-AS-FILE "/") can't represent its result properly, because null strings aren't allowed as pathname names. So just return the argument in this case and hope for the best. --- v7/src/runtime/unxpth.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/v7/src/runtime/unxpth.scm b/v7/src/runtime/unxpth.scm index 9a5bb9903..1047ecd6b 100644 --- a/v7/src/runtime/unxpth.scm +++ b/v7/src/runtime/unxpth.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: unxpth.scm,v 14.14 1993/01/12 23:09:10 gjr Exp $ +$Id: unxpth.scm,v 14.15 1993/01/13 09:53:15 cph Exp $ Copyright (c) 1988-1993 Massachusetts Institute of Technology @@ -249,12 +249,12 @@ MIT in each case. |# (pair? (cdr directory))))) (error:bad-range-argument pathname 'DIRECTORY-PATHNAME-AS-FILE)) (if (null? (cdr directory)) - (%make-pathname (%pathname-host pathname) - 'UNSPECIFIC - directory - "" - false - 'UNSPECIFIC) + ;; Root directory can't be represented as a file, because the + ;; name field of a pathname must be a non-null string. We + ;; could signal an error here, but instead we'll just return + ;; the original pathname and leave it to the caller to deal + ;; with any problems this might cause. + pathname (parse-name (unparse-directory-component (car (last-pair directory))) (lambda (name type) (%make-pathname (%pathname-host pathname) -- 2.25.1