Changeset 14324


Ignore:
Timestamp:
Oct 4, 2010, 8:51:26 PM (9 years ago)
Author:
rme
Message:

Change user-homedir-pathname not to rely on ignore-errors (we can't
signal errors in the cold load).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-pathnames.lisp

    r14020 r14324  
    624624  "Return the home directory of the user as a pathname."
    625625  (declare (ignore host))
    626   (let* ((native
    627           (ignore-errors
    628             (truename
    629              (native-to-directory-pathname (or #+ccl-qres (getenv "HOME")
    630                                                (get-user-home-dir (getuid))))))))
    631     (if (and native (eq :absolute (car (pathname-directory native))))
    632       native
    633       ;; Another plausible choice here is
    634       ;; #p"/tmp/.hidden-directory-of-some-irc-bot-in-eastern-europe/"
    635       ;; Of course, that might already be the value of $HOME.  Anyway,
    636       ;; the user's home directory just contains "config files" (like
    637       ;; SSH keys), and spoofing it can't hurt anything.
     626  (let* ((native (get-user-home-dir (getuid)))
     627         (pathname (and native
     628                        (truename (native-to-directory-pathname native)))))
     629    (if (and pathname (eq :absolute (car (pathname-directory pathname))))
     630      pathname
    638631      (make-pathname :directory '(:absolute) :defaults nil))))
     632 
    639633
    640634
Note: See TracChangeset for help on using the changeset viewer.