Treat input files names passed a start-up the same as those entered

as commands or called as scripts: search for them using $sourcepath.
This commit is contained in:
Giles Atkinson 2023-11-21 17:12:23 +00:00
parent 07ce9c788e
commit 597268cc26
1 changed files with 9 additions and 3 deletions

View File

@ -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;
}
}
}