diff options
Diffstat (limited to 'src/backend/postmaster/pgarch.c')
-rw-r--r-- | src/backend/postmaster/pgarch.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index fc2d9ce7299..e5eecb2dbc5 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -19,7 +19,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.15 2005/03/10 07:14:03 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/postmaster/pgarch.c,v 1.16 2005/06/19 21:34:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -510,8 +510,7 @@ pgarch_readyXlog(char *xlog) errmsg("could not open archive status directory \"%s\": %m", XLogArchiveStatusDir))); - errno = 0; - while ((rlde = readdir(rldir)) != NULL) + while ((rlde = ReadDir(rldir, XLogArchiveStatusDir)) != NULL) { int basenamelen = (int) strlen(rlde->d_name) - 6; @@ -531,23 +530,7 @@ pgarch_readyXlog(char *xlog) strcpy(newxlog, rlde->d_name); } } - - errno = 0; } -#ifdef WIN32 - - /* - * This fix is in mingw cvs (runtime/mingwex/dirent.c rev 1.4), but - * not in released version - */ - if (GetLastError() == ERROR_NO_MORE_FILES) - errno = 0; -#endif - if (errno) - ereport(ERROR, - (errcode_for_file_access(), - errmsg("could not read archive status directory \"%s\": %m", - XLogArchiveStatusDir))); FreeDir(rldir); if (found) |