From daf01359f4f7fc05940c6d9df98a3ec55490858c Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 25 May 2006 16:14:17 +0000 Subject: [PATCH] dont use get-lib-search-dirs if the input path is absolute svn: r3058 original commit: c4e52e3919fd86f38eb3131014cebdf20571ba2e --- collects/mzlib/foreign.ss | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/collects/mzlib/foreign.ss b/collects/mzlib/foreign.ss index d8679d5..1e948f7 100644 --- a/collects/mzlib/foreign.ss +++ b/collects/mzlib/foreign.ss @@ -163,14 +163,17 @@ ;; unreliable). (let* ([version (if (pair? version) (string-append "." (car version)) "")] [fullpath (lambda (p) (path->complete-path (expand-path p)))] - [name0 (path->string (expand-path name))] ; orig name + [absolute? (absolute-path? name)] ; orig name + [name0 (path->string (expand-path name))] [name (if (regexp-match lib-suffix-re name0) ; name + suffix (string-append name0 version) (string-append name0 "." lib-suffix version))]) - (or (ormap (lambda (dir) - (or (ffi-lib (build-path dir name) #t) ; try good name first - (ffi-lib (build-path dir name0) #t))) ; try original - (get-lib-search-dirs)) + (or (and absolute? + (ormap (lambda (dir) + ;; try good name first, then original + (or (ffi-lib (build-path dir name) #t) + (ffi-lib (build-path dir name0) #t))) + (get-lib-search-dirs))) ;; Try without DLL path: (ffi-lib name #t) ; try good name first (ffi-lib name0 #t) ; try original