mcron: Look for local files in local directory.

Previously were looking for files listed on the command line in
Guile's modules directory.  This is a bug-fix; running
'make check' will reveal one less failure than before.

* src/mcron/scripts/mcron.scm (process-user-file): use read and eval
instead of load.
This commit is contained in:
Dale Mellor 2020-04-13 20:05:27 +01:00
commit deaa79a7c6

View file

@ -19,6 +19,7 @@
(define-module (mcron scripts mcron)
#:use-module (ice-9 ftw)
#:use-module (ice-9 rdelim)
#:use-module (mcron base)
#:use-module (mcron config)
#:use-module (mcron job-specifier) ;for user/system files
@ -36,9 +37,11 @@ silently ignored."
(cond ((string=? "-" file-name)
(if (string=? input "vixie")
(read-vixie-port (current-input-port))
(eval-string (read-string))))
(eval-string (read-string)
(resolve-module '(mcron job-specifier)))))
((or guile-syntax? (regexp-exec guile-regexp file-name))
(load file-name))
(eval-string (read-delimited "" (open-input-file file-name))
(resolve-module '(mcron job-specifier))))
((regexp-exec vixie-regexp file-name)
(read-vixie-file file-name))))))