From deaa79a7c687ebc3eb3bb6c318a8e11de154efcb Mon Sep 17 00:00:00 2001 From: Dale Mellor Date: Mon, 13 Apr 2020 20:05:27 +0100 Subject: 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. --- src/mcron/scripts/mcron.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mcron/scripts/mcron.scm') diff --git a/src/mcron/scripts/mcron.scm b/src/mcron/scripts/mcron.scm index 6545ada..8ae61cf 100644 --- a/src/mcron/scripts/mcron.scm +++ b/src/mcron/scripts/mcron.scm @@ -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)))))) -- cgit v1.2.3