1.0.0.9:
authorJuho Snellman <jsnell@iki.fi>
Fri, 1 Dec 2006 17:23:19 +0000 (17:23 +0000)
committerJuho Snellman <jsnell@iki.fi>
Fri, 1 Dec 2006 17:23:19 +0000 (17:23 +0000)
Fix startup with an empty $HOME (reported by Peter Van Eynde).

NEWS
src/code/filesys.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 7e172cf..cd951c7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ changes in sbcl-1.0.1 relative to sbcl-1.0:
   * bug fix: non-required arguments were not passed correctly when a method
     defined using DEFMETHOD was called from a mop-generated method using
     CALL-NEXT-METHOD (reported by Pascal Costanza)
+  * bug fix: an error was signaled at startup if the HOME environment 
+    variable was defined, but had an empty value (reported by Peter Van Eynde)
   * optimization: the FIND and POSITION family of sequence functions
     are significantly faster on arrays whose element types have been
     declared.
index 1b82730..53ff874 100644 (file)
@@ -584,16 +584,18 @@ environment variable has been specified, the directory it designates
 is returned; otherwise obtains the home directory from the operating
 system."
   (declare (ignore host))
-  (parse-native-namestring
-   (ensure-trailing-slash
-    (if (posix-getenv "HOME")
-        (posix-getenv "HOME")
-        #!-win32
-        (sb!unix:uid-homedir (sb!unix:unix-getuid))
-        #!+win32
-        ;; Needs to bypass PARSE-NATIVE-NAMESTRING & ENSURE-TRAILING-SLASH
-        (return-from user-homedir-pathname
-          (sb!win32::get-folder-pathname sb!win32::csidl_profile))))))
+  (let ((env-home (posix-getenv "HOME")))
+    (parse-native-namestring
+     (ensure-trailing-slash
+      (if (and env-home
+               (not (equal env-home "")))
+          env-home
+          #!-win32
+          (sb!unix:uid-homedir (sb!unix:unix-getuid))
+          #!+win32
+          ;; Needs to bypass PARSE-NATIVE-NAMESTRING & ENSURE-TRAILING-SLASH
+          (return-from user-homedir-pathname
+            (sb!win32::get-folder-pathname sb!win32::csidl_profile)))))))
 
 (defun file-write-date (file)
   #!+sb-doc
index 14a8868..394585d 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.0.8"
+"1.0.0.9"