From ee3ef8f30c4241e95f761c41501979dfd4f22c6a Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 17 Nov 2011 13:40:44 -0500 Subject: [PATCH] Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1. --- contrib/pg_upgrade/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pg_upgrade/file.c b/contrib/pg_upgrade/file.c index d3b0eaf2e2..b414769917 100644 --- a/contrib/pg_upgrade/file.c +++ b/contrib/pg_upgrade/file.c @@ -296,7 +296,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++;