~ chicken-core (chicken-5) a5374e0b539121d113e2bb24d9d5c2866a5f3276


commit a5374e0b539121d113e2bb24d9d5c2866a5f3276
Author:     LemonBoy <thatlemon@gmail.com>
AuthorDate: Tue Mar 8 19:11:07 2016 +0100
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Sat Mar 19 19:11:36 2016 +0100

    Make ##sys#find-extension return the full path
    
    Return the whole path including the extension to avoid any ambiguity.
    
    Fixes #133.
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>
    Signed-off-by: Peter Bex <peter@more-magic.net>

diff --git a/eval.scm b/eval.scm
index 320e6967..1016e2be 100644
--- a/eval.scm
+++ b/eval.scm
@@ -1188,12 +1188,12 @@
       (let ((rp (##sys#repository-path)))
 	(define (check path)
 	  (let ((p0 (string-append path "/" p)))
-	    (and (or (and rp
-			  (not ##sys#dload-disabled)
-			  (##sys#fudge 24) ; dload?
-			  (file-exists? (##sys#string-append p0 ##sys#load-dynamic-extension)))
-		     (file-exists? (##sys#string-append p0 source-file-extension)) )
-		 p0) ) )
+	    (or (and rp
+		     (not ##sys#dload-disabled)
+		     (##sys#fudge 24) ; dload?
+		     (file-exists? (##sys#string-append p0 ##sys#load-dynamic-extension)))
+		(file-exists? (##sys#string-append p0 source-file-extension))
+		(file-exists? p0))))
 	(let loop ((paths (##sys#append
 			   (if ##sys#setup-mode '(".") '())
 			   (if rp (list rp) '())
Trap