(let ((trueishname (sb!unix:unix-resolve-links namestring)))
(when trueishname
(let* ((*ignore-wildcards* t)
- (name (simplify-namestring
- trueishname
+ (name (simplify-namestring
+ trueishname
(pathname-host defaulted-pathname))))
(if (eq (sb!unix:unix-file-kind name) :directory)
;; FIXME: this might work, but it's ugly.
(defun sbcl-homedir-pathname ()
(let ((sbcl-home (posix-getenv "SBCL_HOME")))
;; SBCL_HOME isn't set for :EXECUTABLE T embedded cores
- (when sbcl-home
+ (when (and sbcl-home (not (string= sbcl-home "")))
(parse-native-namestring
(ensure-trailing-slash sbcl-home)))))
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 (string= 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