1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

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:19 -04:00
parent 4798aa5b09
commit 4d2d5b8196

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)