From 0ce23e6f10b75f839d2a16b7db9dff0ead8a6924 Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 31 Oct 2013 20:58:44 +0100 Subject: [PATCH] inpcom.c, fix inp_pathopen(), relative path shall be expanded regarding "sourcepath" --- src/frontend/inpcom.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index ce367aac4..20d2ccd9e 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -952,6 +952,8 @@ is_absolute_pathname(const char *p) } +#if 0 + static bool is_plain_filename(const char *p) { @@ -965,6 +967,8 @@ is_plain_filename(const char *p) #endif } +#endif + /*-------------------------------------------------------------------------* Look up the variable sourcepath and try everything in the list in order @@ -1006,10 +1010,10 @@ inp_pathopen(char *name, char *mode) #endif - /* If this is not a plain basename, or there is no sourcepath var, just + /* If this is an absolute filename, or there is no sourcepath var, just * do an fopen. */ - if (!is_plain_filename(name) || !cp_getvar("sourcepath", CP_LIST, &v)) + if (is_absolute_pathname(name) || !cp_getvar("sourcepath", CP_LIST, &v)) return (fopen(name, mode)); for (; v; v = v->va_next) {