Fix to llcontrol_test.cpp, added windows compatible tmp file location.

master
Mark Palange (Mani) 2009-10-19 14:25:42 -07:00
parent 9fc74de1a1
commit ce0e448962
1 changed files with 14 additions and 0 deletions

View File

@ -54,7 +54,21 @@ namespace tut
random.generate();
// generate temp dir
std::ostringstream oStr;
#ifdef LL_WINDOWS
char* tmp_dir = getenv("TMP");
if(tmp_dir)
{
oStr << tmp_dir << "/llcontrol-test-" << random << "/";
}
else
{
oStr << "c:/tmp/llcontrol-test-" << random << "/";
}
#else
oStr << "/tmp/llcontrol-test-" << random << "/";
#endif
mTestConfigDir = oStr.str();
mTestConfigFile = mTestConfigDir + "settings.xml";
LLFile::mkdir(mTestConfigDir);