fix registry setup (#1457)

This commit is contained in:
shun-iwasawa 2017-09-07 17:13:23 +09:00 committed by masafumi-inoue
parent 0763022322
commit acd6b875b5

View file

@ -49,9 +49,7 @@ class EnvGlobals { // singleton
TFilePath *m_dllRelativeDir;
bool m_isPortable = false;
EnvGlobals() : m_stuffDir(0) {
setWorkingDirectory();
}
EnvGlobals() : m_stuffDir(0) { setWorkingDirectory(); }
public:
~EnvGlobals() { delete m_stuffDir; }
@ -188,7 +186,10 @@ public:
}
std::string getRootVarName() { return m_rootVarName; }
void setSystemVarPrefix(std::string prefix) { m_systemVarPrefix = prefix; }
void setSystemVarPrefix(std::string prefix) {
m_systemVarPrefix = prefix;
updateEnvFile();
}
std::string getSystemVarPrefix() {
if (getIsPortable()) return "";
return m_systemVarPrefix;