X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffilesys.lisp;h=53ff874e234af3edfcf5cdd02669f3b11ce02394;hb=2cb068e245e00505076e9c325424df2a1260bfb1;hp=f91ae33b61985f77c105dc44d880d242799a3a6f;hpb=fb8e5ded0b56f50de2024efbcc9ce68b401415f5;p=sbcl.git diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index f91ae33..53ff874 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -508,8 +508,8 @@ otherwise. An error of type FILE-ERROR is signaled if pathname is wild." (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. @@ -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