mirror of
https://github.com/systemd/systemd.git
synced 2024-12-02 23:03:50 +08:00
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:
parent
71fda00f32
commit
a8ccacf534
Notes:
Zbigniew Jędrzejewski-Szmek
2013-10-21 16:54:33 -04:00
Backport: bugfix
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user