Fail on glob
This commit is contained in:
parent
baedcf23bb
commit
788d612921
2
cbt.h
2
cbt.h
|
@ -599,7 +599,7 @@ void _cbt_lib_src(struct cbt_lib *lib, ...) {
|
||||||
glob_t globbuf;
|
glob_t globbuf;
|
||||||
|
|
||||||
for (char *arg = va_arg(args, char *); arg; arg = va_arg(args, char *)) {
|
for (char *arg = va_arg(args, char *); arg; arg = va_arg(args, char *)) {
|
||||||
glob(arg, GLOB_APPEND | GLOB_BRACE, _cbt_globerr, &globbuf);
|
CBT_FAIL(glob(arg, GLOB_APPEND | GLOB_BRACE, _cbt_globerr, &globbuf) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < globbuf.gl_pathc; i++) {
|
for (size_t i = 0; i < globbuf.gl_pathc; i++) {
|
||||||
|
|
Loading…
Reference in New Issue