mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 10:41:18 +02:00
Fix pg_upgrade's pg_scandir_internal() to properly handle a NULL
pattern, which is used on PG 9.1 and HEAD (but not pre-9.1). Fixes crash on Windows. Backpatched to 9.1. Reported by Mark Dilger
This commit is contained in:
parent
b735757c32
commit
988f907d24
@ -296,7 +296,7 @@ pg_scandir_internal(const char *dirname,
|
|||||||
while ((direntry = readdir(dirdesc)) != NULL)
|
while ((direntry = readdir(dirdesc)) != NULL)
|
||||||
{
|
{
|
||||||
/* Invoke the selector function to see if the direntry matches */
|
/* Invoke the selector function to see if the direntry matches */
|
||||||
if ((*selector) (direntry))
|
if (selector && (*selector) (direntry))
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user