diff options
author | Bastien Nocera <hadess@hadess.net> | 2013-10-14 08:15:51 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-10-14 10:11:33 -0400 |
commit | a8ccacf5344c4434b1d5ff3837307acb8fcf93d2 (patch) | |
tree | fa3243bfc43194e1f1d1319bad065a47279496cd | |
parent | 71fda00f320379f5cbee8e118848de98caaa229d (diff) |
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.
-rw-r--r-- | src/shared/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 54dbace193..1822770304 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -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; |