X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fpath.c;h=21796a7aec9ba46f0b84eaccc2187feabb6dca97;hb=dfecfa4b4b77983ddf8253b1b8effaf5c1a0ce80;hp=27af5b3ffd97de131311494a07cb2a2ac87314c5;hpb=3d3fd4b7278c48da489d2cc296c1027d7aa722f2;p=mmh diff --git a/sbr/path.c b/sbr/path.c index 27af5b3..21796a7 100644 --- a/sbr/path.c +++ b/sbr/path.c @@ -18,6 +18,7 @@ ** 2) Next, if already absolute pathname, then leave unchanged. ** 3) Next, check in mmh directory. ** 4) Next, check in mmh `etc' directory. +** 5) As fall-back, return `file' unchanged. */ char * etcpath(char *file) @@ -65,9 +66,11 @@ try_it: /* Check nmh `etc' directory */ snprintf(epath, sizeof epath, "%s/%s", mhetcdir, file); - return (access(epath, R_OK) != NOTOK ? epath : file); + if (access(epath, R_OK) != NOTOK) + return epath; - /* TODO: What is the ultimate fallback? NULL or file? */ + /* The fall-back */ + return file; }