1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

more sensible error if compiled-file-name returns false in compile-file

* module/system/base/compile.scm (compile-file): Error if no output-file
  is given and compiled-file-name returns false.
This commit is contained in:
Andy Wingo 2011-01-26 22:09:06 +01:00
parent 177db8f133
commit 2183d66e13

View file

@ -117,7 +117,9 @@
(opts '())
(canonicalization 'relative))
(with-fluids ((%file-port-name-canonicalization canonicalization))
(let* ((comp (or output-file (compiled-file-name file)))
(let* ((comp (or output-file (compiled-file-name file)
(error "failed to create path for autocompiled file"
file)))
(in (open-input-file file))
(enc (file-encoding in)))
;; Choose the input encoding deterministically.