postgres.git / summary / log / commit / refs
commit ee3ef8f30c4241e95f761c41501979dfd4f22c6a
Author: Bruce Momjian <bruce@momjian.us>
Date: Thu Nov 17 18:40:44 2011 +0000
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 d3b0eaf2e28..b414769917f 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++;
[parent: 988f907d2437]