1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00

Remove PGDATA setting and use DataDir.

This commit is contained in:
Bruce Momjian
1997-12-11 17:03:52 +00:00
parent b69359e2d7
commit 645cc13276
2 changed files with 3 additions and 15 deletions

View File

@ -27,15 +27,8 @@ char* crypt_getpwdfilename() {
static char* filename = NULL;
if (!filename) {
char* env = NULL;
env = getenv("PGDATA");
if(env == NULL) {
elog(FATAL, "crypt.c: PGDATA is not defined");
exit(-1);
}
filename = (char*)palloc(strlen(env) + strlen(CRYPT_PWD_FILE) + 2);
sprintf(filename, "%s/%s", env, CRYPT_PWD_FILE);
filename = (char*)palloc(strlen(DataDir) + strlen(CRYPT_PWD_FILE) + 2);
sprintf(filename, "%s/%s", DataDir, CRYPT_PWD_FILE);
}
return filename;