From: Bruce Momjian Date: Thu, 17 Nov 2011 18:40:45 +0000 (-0500) Subject: Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1. X-Git-Tag: REL9_1_2~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=663e27c405a0e6bfe7c4fd7e23dce67a46fb07e9;p=postgresql Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1. --- diff --git a/contrib/pg_upgrade/file.c b/contrib/pg_upgrade/file.c index 4983e7f5ad..8fdc86d7d4 100644 --- a/contrib/pg_upgrade/file.c +++ b/contrib/pg_upgrade/file.c @@ -294,7 +294,7 @@ pg_scandir_internal(const char *dirname, while ((direntry = readdir(dirdesc)) != NULL) { /* Invoke the selector function to see if the direntry matches */ - if (selector && (*selector) (direntry)) + if (!selector || (*selector) (direntry)) { count++;