diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 5a08b134..e40efa4b 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -43,6 +43,7 @@ extern "C" { #undef __attribute__ /* glibc bug - rhbz 1763325 */ #endif +#include #include #include #include @@ -415,10 +416,32 @@ parse_opt (int key, char *arg, if (http_port > 65535) argp_failure(state, 1, EINVAL, "port number"); break; case 'F': - files_paths.insert(string(arg)); + { + glob_t gl; + int res = glob(arg, GLOB_TILDE_CHECK, NULL, &gl); + if (res == 0) + { + for (size_t i=0; i < gl.gl_pathc; i++) + files_paths.insert(string(gl.gl_pathv[i])); + } + else + argp_failure(state, 1, EINVAL, "'%s' didn't match anything", arg); + globfree(&gl); + } break; case 'R': - rpms_paths.insert(string(arg)); + { + glob_t gl; + int res = glob(arg, GLOB_TILDE_CHECK, NULL, &gl); + if (res == 0) + { + for (size_t i=0; i < gl.gl_pathc; i++) + rpms_paths.insert(string(gl.gl_pathv[i])); + } + else + argp_failure(state, 1, EINVAL, "'%s' didn't match anything", arg); + globfree(&gl); + } break; case 'L': traverse_logical = true;