X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffilesys.lisp;h=53ff874e234af3edfcf5cdd02669f3b11ce02394;hb=b7f3ef098847a4cc680f6304cec735b63bb70a0a;hp=1b82730902ab1846c20f78c98a501077d583a7dd;hpb=6584a2c88efaa6931083721adae2f9f10e0fefd5;p=sbcl.git diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index 1b82730..53ff874 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -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