mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
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:
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user