libpkgconf: pkg: handle error value from stat(2).
parent
67796a1d86
commit
e5f3dac6e7
|
@ -452,7 +452,9 @@ pkgconf_pkg_scan_dir(pkgconf_client_t *client, const char *path, void *data, pkg
|
|||
pkgconf_strlcat(filebuf, "/", sizeof filebuf);
|
||||
pkgconf_strlcat(filebuf, dirent->d_name, sizeof filebuf);
|
||||
|
||||
stat(filebuf, &st);
|
||||
if (stat(filebuf, &st) == -1)
|
||||
continue;
|
||||
|
||||
if (!(S_ISREG(st.st_mode)))
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue