$OpenBSD: patch-src_editfns_c,v 1.1 2001/03/01 21:20:17 naddy Exp $ --- src/editfns.c.orig Mon Feb 5 17:11:04 2001 +++ src/editfns.c Mon Feb 5 17:36:51 2001 @@ -871,6 +871,7 @@ char * get_home_directory (void) { int output_home_warning = 0; + struct passwd *pw = NULL; if (cached_home_directory == NULL) { @@ -912,6 +913,13 @@ get_home_directory (void) # endif } #else /* !WINDOWSNT */ + if ((pw = getpwuid(getuid())) != NULL) + { + cached_home_directory = pw->pw_dir; + output_home_warning = 0; + } + else + { /* * Unix, typically. * Using "/" isn't quite right, but what should we do? @@ -920,6 +928,7 @@ get_home_directory (void) */ cached_home_directory = "/"; output_home_warning = 1; + } #endif /* !WINDOWSNT */ } if (initialized && output_home_warning)