From ddaff326c2d787d2d067ba2470ec458515a95291 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 30 Dec 1997 01:25:40 +0000 Subject: [PATCH] Fix bug: CURRENT-HOME-DIRECTORY would signal an error when neither the home directory nor the user name was available. Now, it returns the root of the system drive instead. --- v7/src/runtime/ntprm.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/v7/src/runtime/ntprm.scm b/v7/src/runtime/ntprm.scm index 9e9ec927b..f82d53ff8 100644 --- a/v7/src/runtime/ntprm.scm +++ b/v7/src/runtime/ntprm.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: ntprm.scm,v 1.19 1997/12/23 05:09:01 cph Exp $ +$Id: ntprm.scm,v 1.20 1997/12/30 01:25:40 cph Exp $ Copyright (c) 1992-97 Massachusetts Institute of Technology @@ -295,10 +295,12 @@ MIT in each case. |# ;; directory of system drive. If still nothing, use ;; root directory of system drive. (or (let ((usersdir (%users-directory))) - (and usersdir + (and user-name + usersdir (trydir (merge-pathnames user-name usersdir)))) (let ((rootdir (%system-root-directory))) - (or (trydir (merge-pathnames user-name rootdir)) + (or (and user-name + (trydir (merge-pathnames user-name rootdir))) rootdir))))))) (set! user-home-directory -- 2.25.1