summaryrefslogtreecommitdiff
path: root/module/ice-9/psyntax.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-06-24 10:40:09 +0200
committerAndy Wingo <wingo@pobox.com>2016-06-24 10:40:09 +0200
commit5ca24b6ba1bc617e60a0a9b2ecad7f112e99ef9c (patch)
tree01fadab8cee53e1735836c36a2b971a02c8cabc0 /module/ice-9/psyntax.scm
parent395582b218ee57358df825314acaa7e08a2ce6f9 (diff)
downloadguile-5ca24b6ba1bc617e60a0a9b2ecad7f112e99ef9c.tar.gz
Fix include-from-path when file found in relative path
* module/ice-9/psyntax.scm (include-from-path): Canonicalize result of %search-load-path. Otherwise a relative path passed to `include' would be treated as relative to the directory of the file that contains the `include-from-path'. Fixes #21347. * module/ice-9/psyntax-pp.scm: Regenerate.
Diffstat (limited to 'module/ice-9/psyntax.scm')
-rw-r--r--module/ice-9/psyntax.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm
index a45353aa3..e68b4ca7d 100644
--- a/module/ice-9/psyntax.scm
+++ b/module/ice-9/psyntax.scm
@@ -3204,10 +3204,11 @@
(let ((fn (syntax->datum #'filename)))
(with-syntax ((fn (datum->syntax
#'filename
- (or (%search-load-path fn)
- (syntax-violation 'include-from-path
- "file not found in path"
- x #'filename)))))
+ (canonicalize-path
+ (or (%search-load-path fn)
+ (syntax-violation 'include-from-path
+ "file not found in path"
+ x #'filename))))))
#'(include fn)))))))
(define-syntax unquote