blob: 8a3e19c7c6c4730e661626d75af2fcb135f1ca2a [file] [log] [blame]
--- aspell-0.60.7-20110707/common/config.cpp.orig 2014-03-20 19:51:08.756753700 +0000
+++ aspell-0.60.7-20110707/common/config.cpp 2014-03-20 20:15:54.984480600 +0000
@@ -658,6 +671,21 @@
} else { // sep == '|'
assert(replace[0] == '$');
const char * env = getenv(replace.c_str()+1);
+ if (NULL == env && strcmp (replace.c_str() + 1, "HOME") == 0)
+ {
+ const char *hd, *hp;
+ hd = getenv("HOMEDRIVE");
+ hp = getenv("HOMEPATH");
+ if (hd && hp)
+ {
+ char tmpbuf[strlen ("HOME=") + strlen (hd) + strlen (hp) + 1];
+ strcpy (tmpbuf, "HOME=");
+ strcpy (&tmpbuf[strlen ("HOME=")], hd);
+ strcpy (&tmpbuf[strlen ("HOME=") + strlen (hd)], hp);
+ putenv (tmpbuf);
+ env = getenv(replace.c_str()+1);
+ }
+ }
final_str += env ? env : second;
}
replace = "";