Look at $TMP and $TEMP, not just $TEMPDIR. Bug 176887, r=timeless, sr=alecf

This commit is contained in:
bzbarsky%mit.edu 2002-11-06 01:56:00 +00:00
Родитель 446fcf43f8
Коммит f2f0308507
1 изменённых файлов: 16 добавлений и 6 удалений

Просмотреть файл

@ -541,12 +541,22 @@ void nsSpecialSystemDirectory::operator = (SystemDirectories aSystemSystemDirect
#elif defined(XP_UNIX) || defined(XP_BEOS)
{
char *tPath = PR_GetEnv("TMPDIR");
if (!tPath || PL_strlen(tPath) == 0)
*this = "/tmp/";
else
*this = tPath;
}
static const char *tPath = nsnull;
if (!tPath) {
tPath = PR_GetEnv("TMPDIR");
if (!tPath || !*tPath) {
tPath = PR_GetEnv("TMP");
if (!tPath || !*tPath) {
tPath = PR_GetEnv("TEMP");
if (!tPath || !*tPath) {
tPath = "/tmp/";
}
}
}
}
*this = tPath;
}
#endif
break;