Skip to content
Snippets Groups Projects
Commit 81013f6b authored by Felix Fietkau's avatar Felix Fietkau
Browse files

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


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

SVN-Revision: 39862
parent 5ef90f65
No related branches found
No related tags found
No related merge requests found
...@@ -345,6 +345,13 @@ void zconf_nextfile(const char *name) ...@@ -345,6 +345,13 @@ void zconf_nextfile(const char *name)
int i; int i;
err = glob(name, GLOB_ERR | GLOB_MARK, NULL, &gl); 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) { if (err) {
const char *reason = "unknown error"; const char *reason = "unknown error";
......
...@@ -2401,6 +2401,13 @@ void zconf_nextfile(const char *name) ...@@ -2401,6 +2401,13 @@ void zconf_nextfile(const char *name)
int i; int i;
err = glob(name, GLOB_ERR | GLOB_MARK, NULL, &gl); 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) { if (err) {
const char *reason = "unknown error"; const char *reason = "unknown error";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment