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:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/port/path.c,v 1.50 2005/01/10 00:19:51 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/port/path.c,v 1.51 2005/01/26 19:24:03 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -21,7 +21,7 @@
|
||||
#ifdef _WIN32_IE
|
||||
#undef _WIN32_IE
|
||||
#endif
|
||||
#define _WIN32_IE 0x0400
|
||||
#define _WIN32_IE 0x0500
|
||||
#ifdef near
|
||||
#undef near
|
||||
#endif
|
||||
@ -476,7 +476,7 @@ get_home_path(char *ret_path)
|
||||
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(ret_path, MAXPGPATH, "%s/postgresql", tmppath);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user