Fix pg_update to properly test for the data directory's existence on

Win32.

Backpatch to 9.1.
This commit is contained in:
Bruce Momjian 2011-07-30 01:50:18 -04:00
parent b4fbe392f8
commit a31dc392d6
1 changed files with 3 additions and 1 deletions

View File

@ -168,7 +168,9 @@ check_data_dir(const char *pg_data)
{
struct stat statBuf;
snprintf(subDirName, sizeof(subDirName), "%s/%s", pg_data,
snprintf(subDirName, sizeof(subDirName), "%s%s%s", pg_data,
/* Win32 can't stat() a directory with a trailing slash. */
*requiredSubdirs[subdirnum] ? "/" : "",
requiredSubdirs[subdirnum]);
if (stat(subDirName, &statBuf) != 0)