From 0eccaca87abec1330ec4990f850bb1af0d60e144 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 23 Nov 1998 06:27:23 +0000 Subject: [PATCH] Change USER-HOME-DIRECTORY to generate an error if it can't find the home directory. This is what the unix version of this procedure does. The reason for this change is that it will allow files whose names begin with "~" to be referenced. Such files are commonly generated by some Windows installation programs. --- v7/src/runtime/ntprm.scm | 10 +++++----- v7/src/runtime/os2prm.scm | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/v7/src/runtime/ntprm.scm b/v7/src/runtime/ntprm.scm index bde3f75cf..3fe8c20af 100644 --- a/v7/src/runtime/ntprm.scm +++ b/v7/src/runtime/ntprm.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: ntprm.scm,v 1.23 1998/09/06 04:45:15 cph Exp $ +$Id: ntprm.scm,v 1.24 1998/11/23 06:27:16 cph Exp $ Copyright (c) 1992-98 Massachusetts Institute of Technology @@ -294,10 +294,10 @@ MIT in each case. |# user-name (directory-pathname-as-file homedir)))) ;; Look for USER-NAME in root directory of system - ;; drive. Failing that, use root directory itself. - (let ((rootdir (%system-root-directory))) - (or (trydir (merge-pathnames user-name rootdir)) - rootdir))))))) + ;; drive. + (trydir (merge-pathnames user-name (%system-root-directory))) + ;; OK, give up: + (error "Can't find user's home directory:" user-name)))))) (define dos/user-home-directory user-home-directory) (define dos/current-user-name current-user-name) diff --git a/v7/src/runtime/os2prm.scm b/v7/src/runtime/os2prm.scm index 43cdf2d43..40e72b100 100644 --- a/v7/src/runtime/os2prm.scm +++ b/v7/src/runtime/os2prm.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: os2prm.scm,v 1.36 1998/05/31 03:20:22 cph Exp $ +$Id: os2prm.scm,v 1.37 1998/11/23 06:27:23 cph Exp $ Copyright (c) 1994-98 Massachusetts Institute of Technology @@ -280,10 +280,10 @@ MIT in each case. |# user-name (directory-pathname-as-file homedir)))) ;; Look for USER-NAME in root directory of system - ;; drive. Failing that, use root directory itself. - (let ((rootdir (%system-root-directory))) - (or (trydir (merge-pathnames user-name rootdir)) - rootdir))))))) + ;; drive. + (trydir (merge-pathnames user-name (%system-root-directory))) + ;; OK, give up: + (error "Can't find user's home directory:" user-name)))))) (define (dos/fs-drive-type pathname) (let ((type -- 2.25.1