summaryrefslogtreecommitdiff
path: root/module/system/base/compile.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-06-19 14:26:47 +0200
committerAndy Wingo <wingo@pobox.com>2009-06-19 14:26:47 +0200
commit25b82b3485e9e44d8d6268d3774b0b81d0d501b2 (patch)
treef3378fd8b175d43240e6bff9f749826e4da87175 /module/system/base/compile.scm
parentffca4c2203d85bc4d9e348d77053d21112e665af (diff)
downloadguile-25b82b3485e9e44d8d6268d3774b0b81d0d501b2.tar.gz
new function: canonicalize-path. use when autocompiling
* libguile/filesys.h: * libguile/filesys.c (scm_canonicalize_path): New function, canonicalize-path. * module/system/base/compile.scm (compiled-file-name): Canonicalize the filename so that compiling e.g. ../foo.scm doesn't compile to ~/.guile-ccache/1.9/../foo.scm.
Diffstat (limited to 'module/system/base/compile.scm')
-rw-r--r--module/system/base/compile.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index 9f0ff2f3d..dfe8823be 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -131,7 +131,8 @@
(else (car %load-compiled-extensions))))
(and %compile-fallback-path
(let ((f (string-append
- %compile-fallback-path "/" file (compiled-extension))))
+ %compile-fallback-path "/" (canonicalize-path file)
+ (compiled-extension))))
(and (false-if-exception (ensure-writable-dir (dirname f)))
f))))