mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-05 06:30:30 +01:00
Bump scanned_dir_count even if dir cannot be read
This allows the --debug output to follow the actual order of the directories specified in the path. $ PKG_CONFIG_PATH=/nosuch1:/nosuch2:/dir-with-foo.pc $ pkg-config --debug foo [...] Path position of 'foo' is 1 With this change, the path position above would be 3, matching the position in PKG_CONFIG_PATH. Freedesktop #80380 (https://bugs.freedesktop.org/show_bug.cgi?id=80380)
This commit is contained in:
parent
0e847a2201
commit
a4ef3552eb
1 changed files with 6 additions and 5 deletions
11
pkg.c
11
pkg.c
|
|
@ -160,16 +160,17 @@ scan_dir (char *dirname)
|
|||
#endif
|
||||
dir = opendir (dirname_copy);
|
||||
g_free (dirname_copy);
|
||||
|
||||
scanned_dir_count += 1;
|
||||
|
||||
if (!dir)
|
||||
{
|
||||
debug_spew ("Cannot open directory '%s' in package search path: %s\n",
|
||||
dirname, g_strerror (errno));
|
||||
debug_spew ("Cannot open directory #%i '%s' in package search path: %s\n",
|
||||
scanned_dir_count, dirname, g_strerror (errno));
|
||||
return;
|
||||
}
|
||||
|
||||
debug_spew ("Scanning directory '%s'\n", dirname);
|
||||
|
||||
scanned_dir_count += 1;
|
||||
debug_spew ("Scanning directory #%i '%s'\n", scanned_dir_count, dirname);
|
||||
|
||||
while ((dent = readdir (dir)))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue