shared/util: Fix glob_extend() argument

glob_extend() would completely fail to work, or return incorrect
data if it wasn't being passed the current getopt "optarg" variable
as it used the global variable, instead of the passed parameters.
This commit is contained in:
Bastien Nocera
2013-10-14 10:11:33 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent 71fda00f32
commit a8ccacf534
+1 -1
View File
@@ -4461,7 +4461,7 @@ int glob_extend(char ***strv, const char *path) {
char **p;
errno = 0;
k = glob(optarg, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
k = glob(path, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
if (k == GLOB_NOMATCH)
return -ENOENT;