1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the

APPDATA directory on Windows.  Magnus Hagander
This commit is contained in:
Tom Lane
2005-01-26 19:24:03 +00:00
parent c0e0d3e2e9
commit 889f038129
7 changed files with 20 additions and 14 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.301 2005/01/14 00:25:56 momjian Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.302 2005/01/26 19:24:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -38,7 +38,7 @@
#ifdef _WIN32_IE
#undef _WIN32_IE
#endif
#define _WIN32_IE 0x0400
#define _WIN32_IE 0x0500
#ifdef near
#undef near
#endif
@ -3296,7 +3296,7 @@ pqGetHomeDirectory(char *buf, int bufsize)
char tmppath[MAX_PATH];
ZeroMemory(tmppath, sizeof(tmppath));
if (!SHGetSpecialFolderPath(NULL, tmppath, CSIDL_APPDATA, FALSE))
if (SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, tmppath) != S_OK)
return false;
snprintf(buf, bufsize, "%s/postgresql", tmppath);
return true;