summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2011-11-17 18:40:44 +0000
committerBruce Momjian2011-11-17 18:40:44 +0000
commitee3ef8f30c4241e95f761c41501979dfd4f22c6a (patch)
treea1d506e35e1c9d7b3fb32c5346ebced0c7fec6ae
parent988f907d2437ea0b45aa0002178610bb9d8a399a (diff)
Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1.
-rw-r--r--contrib/pg_upgrade/file.c2
1 files changed, 1 insertions, 1 deletions
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++;