scripts/config: make wildcard include with no results non-fatal

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39862 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2014-03-10 18:58:40 +00:00
parent 37b41d7e50
commit 2729ebed04
2 changed files with 14 additions and 0 deletions

View file

@ -345,6 +345,13 @@ void zconf_nextfile(const char *name)
int i;
err = glob(name, GLOB_ERR | GLOB_MARK, NULL, &gl);
/* ignore wildcard patterns that return no result */
if (err == GLOB_NOMATCH && strchr(name, '*')) {
err = 0;
gl.gl_pathc = 0;
}
if (err) {
const char *reason = "unknown error";

View file

@ -2401,6 +2401,13 @@ void zconf_nextfile(const char *name)
int i;
err = glob(name, GLOB_ERR | GLOB_MARK, NULL, &gl);
/* ignore wildcard patterns that return no result */
if (err == GLOB_NOMATCH && strchr(name, '*')) {
err = 0;
gl.gl_pathc = 0;
}
if (err) {
const char *reason = "unknown error";