X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-pathname.lisp;h=f32e656cce224b6f2cb8c0d8f75732bf93465e21;hb=b1cd84e0503ff29d72a860ea1709c87f721412ed;hp=33f4d8dff7ae011c6981d68fb5bf51daf0687a0c;hpb=6584a2c88efaa6931083721adae2f9f10e0fefd5;p=sbcl.git diff --git a/src/code/target-pathname.lisp b/src/code/target-pathname.lisp index 33f4d8d..f32e656 100644 --- a/src/code/target-pathname.lisp +++ b/src/code/target-pathname.lisp @@ -111,7 +111,7 @@ ;;; Hash table searching maps a logical pathname's host to its ;;; physical pathname translation. -(defvar *logical-hosts* (make-hash-table :test 'equal)) +(defvar *logical-hosts* (make-hash-table :test 'equal :synchronized t)) ;;;; patterns @@ -1270,8 +1270,9 @@ PARSE-NAMESTRING." (frob %pathname-name) (frob %pathname-type) (if (eq from-host *unix-host*) - (if (eq (%pathname-version to) :wild) - (%pathname-version from) + (if (or (eq (%pathname-version to) :wild) + (eq (%pathname-version to) nil)) + (%pathname-version source) (%pathname-version to)) (frob %pathname-version))))))))) @@ -1337,11 +1338,12 @@ PARSE-NAMESTRING." ;;; a new one if necessary. (defun intern-logical-host (thing) (declare (values logical-host)) - (or (find-logical-host thing nil) - (let* ((name (logical-word-or-lose thing)) - (new (make-logical-host :name name))) - (setf (gethash name *logical-hosts*) new) - new))) + (with-locked-hash-table (*logical-hosts*) + (or (find-logical-host thing nil) + (let* ((name (logical-word-or-lose thing)) + (new (make-logical-host :name name))) + (setf (gethash name *logical-hosts*) new) + new)))) ;;;; logical pathname parsing