postgres.git / summary / log / commit / refs
commit 663e27c405a0e6bfe7c4fd7e23dce67a46fb07e9
Author: Bruce Momjian <bruce@momjian.us>
Date: Thu Nov 17 18:40:45 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 4983e7f5ad9..8fdc86d7d47 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++;
[parent: 379aa2f5a40c]