]> granicus.if.org Git - postgresql/commitdiff
Fix pg_upgrade's pg_scandir_internal() the right way. Backpatch to 9.1.
authorBruce Momjian <bruce@momjian.us>
Thu, 17 Nov 2011 18:40:45 +0000 (13:40 -0500)
committerBruce Momjian <bruce@momjian.us>
Thu, 17 Nov 2011 18:40:45 +0000 (13:40 -0500)
contrib/pg_upgrade/file.c

index 4983e7f5ad9562f62db5e23a8cb8087539c9b6ab..8fdc86d7d471d7fc822ba0e402bc0dcc7c70988b 100644 (file)
@@ -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++;