Browse Source

inpcom.c, fix inp_pathopen(), always try to fopen() relative to the current working directory first

pre-master-46
rlar 13 years ago
parent
commit
9b4238ed04
  1. 10
      src/frontend/inpcom.c

10
src/frontend/inpcom.c

@ -1010,11 +1010,13 @@ inp_pathopen(char *name, char *mode)
#endif
/* If this is an absolute filename, or there is no sourcepath var, just
* do an fopen.
*/
/* just try it */
if ((fp = fopen(name, mode)) != NULL)
return fp;
/* fail if this was an absolute filename or if there is no sourcepath var */
if (is_absolute_pathname(name) || !cp_getvar("sourcepath", CP_LIST, &v))
return (fopen(name, mode));
return NULL;
for (; v; v = v->va_next) {

Loading…
Cancel
Save