Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1.

REL9_1_STABLE
Bruce Momjian 14 years ago
parent 379aa2f5a4
commit 663e27c405
  1. 2
      contrib/pg_upgrade/file.c

@ -294,7 +294,7 @@ pg_scandir_internal(const char *dirname,
while ((direntry = readdir(dirdesc)) != NULL) while ((direntry = readdir(dirdesc)) != NULL)
{ {
/* Invoke the selector function to see if the direntry matches */ /* Invoke the selector function to see if the direntry matches */
if (selector && (*selector) (direntry)) if (!selector || (*selector) (direntry))
{ {
count++; count++;

Loading…
Cancel
Save