From 597268cc26e12cc67a4826ca28055c78d370e3de Mon Sep 17 00:00:00 2001 From: Giles Atkinson <“gatk555@gmail.com”> Date: Tue, 21 Nov 2023 17:12:23 +0000 Subject: [PATCH] Treat input files names passed a start-up the same as those entered as commands or called as scripts: search for them using $sourcepath. --- src/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 174931fd5..0dc5db052 100644 --- a/src/main.c +++ b/src/main.c @@ -1406,10 +1406,16 @@ int main(int argc, char **argv) tp = fopen(p, "r"); tfree(p); } + if (!tp) { - perror(arg); - err = 1; - break; + /* Try and find it in a directory in $sourcepath. */ + + tp = inp_pathopen(arg, "r"); + if (!tp) { + perror(arg); + err = 1; + break; + } } }