X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffilesys.lisp;h=32a48ef84e080379d735d977da94f2ee0f5c5046;hb=f8893c7c658bf9d9e0757c63e47af2fdea810f04;hp=849d66ed4baaa9a4e7ca1b9699e18e0b9fd5a4a2;hpb=9f433c5e00c308f72981dca4451d7837de14de48;p=sbcl.git diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index 849d66e..32a48ef 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -713,7 +713,6 @@ :format-arguments (list (namestring pathname)))) result)) -;;; If PATHNAME exists, return its truename, otherwise NIL. (defun probe-file (pathname) #!+sb-doc "Return a pathname which is the truename of the file if it exists, or NIL @@ -830,9 +829,16 @@ (merged-pathname (merge-pathnames pathname))) (!enumerate-matches (match merged-pathname) (let* ((*ignore-wildcards* t) - (truename (truename match))) - (setf (gethash (namestring truename) truenames) - truename))) + ;; FIXME: Why not TRUENAME? As reported by Milan Zamazal + ;; sbcl-devel 2003-10-05, using TRUENAME causes a race + ;; condition whereby removal of a file during the + ;; directory operation causes an error. It's not clear + ;; what the right thing to do is, though. -- CSR, + ;; 2003-10-13 + (truename (probe-file match))) + (when truename + (setf (gethash (namestring truename) truenames) + truename)))) (mapcar #'cdr ;; Sorting isn't required by the ANSI spec, but sorting ;; into some canonical order seems good just on the