1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Use NAMEDATALEN instead of local define.

Modify path separators for Win32.

Per ideas from Takahiro Itagaki
This commit is contained in:
Bruce Momjian
2010-05-14 00:13:38 +00:00
parent 36d3afd2d4
commit e9ad14f9f4
5 changed files with 18 additions and 24 deletions

View File

@ -138,7 +138,7 @@ check_exec(migratorContext *ctx, const char *dir, const char *cmdName)
char path[MAXPGPATH];
const char *errMsg;
snprintf(path, sizeof(path), "%s%c%s", dir, pathSeparator, cmdName);
snprintf(path, sizeof(path), "%s/%s", dir, cmdName);
if ((errMsg = validate_exec(path)) == NULL)
return 1; /* 1 -> first alternative OK */
@ -286,8 +286,8 @@ check_data_dir(migratorContext *ctx, const char *pg_data)
{
struct stat statBuf;
snprintf(subDirName, sizeof(subDirName), "%s%c%s", pg_data,
pathSeparator, requiredSubdirs[subdirnum]);
snprintf(subDirName, sizeof(subDirName), "%s/%s", pg_data,
requiredSubdirs[subdirnum]);
if ((stat(subDirName, &statBuf)) != 0)
{