- #ifdef __UNIX__
- const char *szHome = getenv("HOME");
- if ( szHome == NULL ) {
- // we're homeless...
- wxLogWarning(_("can't find user's HOME, using current directory."));
- strDir = ".";
- }
- else
- strDir = szHome;
- strDir << '/'; // a double slash is no problem, a missin one yes
- #else // Windows
- #ifdef __WIN32__
- const char *szHome = getenv("HOMEDRIVE");
- if ( szHome != NULL )
- strDir << szHome;
- szHome = getenv("HOMEPATH");
- if ( szHome != NULL )
- strDir << szHome;
- #else // Win16
- // Win16 has no idea about home, so use the current directory instead
- strDir = ".\\";
- #endif // WIN16/32
- #endif // UNIX/Win