|
webpg-npapi 0.6.1
|
Attempts to determine the correct location of the gpg configuration file. Definition at line 321 of file webpgPluginAPI.cpp. Referenced by restoreGPGConfig(), and setTempGPGOption(). {
std::string config_path = "";
if (GNUPGHOME.length() > 0) {
config_path = GNUPGHOME;
} else {
char const* home = getenv("HOME");
if (home || (home = getenv("USERPROFILE"))) {
config_path = home;
} else {
char const *hdrive = getenv("HOMEDRIVE"),
*hpath = getenv("HOMEPATH");
assert(hdrive); // or other error handling
assert(hpath);
config_path = std::string(hdrive) + hpath;
}
}
#ifdef HAVE_W32_SYSTEM
config_path += "\\Application Data\\gnupg\\gpg.conf";
#else
config_path += "/.gnupg/gpg.conf";
#endif
return config_path;
}
|
1.7.4