diff options
author | Dale Mellor <mcron-lsfnyl@rdmp.org> | 2020-04-13 20:05:27 +0100 |
---|---|---|
committer | Dale Mellor <mcron-lsfnyl@rdmp.org> | 2020-04-20 16:49:05 +0000 |
commit | deaa79a7c687ebc3eb3bb6c318a8e11de154efcb (patch) | |
tree | f5725d61b97a64c0f95814982643ff6c1208cd27 /src/mcron | |
parent | ad6e4e550512555328cfbc8f2777e71f5d0e28a4 (diff) | |
download | mcron-deaa79a7c687ebc3eb3bb6c318a8e11de154efcb.tar.gz mcron-deaa79a7c687ebc3eb3bb6c318a8e11de154efcb.tar.bz2 mcron-deaa79a7c687ebc3eb3bb6c318a8e11de154efcb.zip |
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.
Diffstat (limited to 'src/mcron')
-rw-r--r-- | src/mcron/scripts/mcron.scm | 7 |
1 files changed, 5 insertions, 2 deletions
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)))))) |