зеркало из https://github.com/mozilla/gecko-dev.git
Look at $TMP and $TEMP, not just $TEMPDIR. Bug 176887, r=timeless, sr=alecf
This commit is contained in:
Родитель
446fcf43f8
Коммит
f2f0308507
|
@ -541,12 +541,22 @@ void nsSpecialSystemDirectory::operator = (SystemDirectories aSystemSystemDirect
|
||||||
|
|
||||||
#elif defined(XP_UNIX) || defined(XP_BEOS)
|
#elif defined(XP_UNIX) || defined(XP_BEOS)
|
||||||
{
|
{
|
||||||
char *tPath = PR_GetEnv("TMPDIR");
|
static const char *tPath = nsnull;
|
||||||
if (!tPath || PL_strlen(tPath) == 0)
|
if (!tPath) {
|
||||||
*this = "/tmp/";
|
tPath = PR_GetEnv("TMPDIR");
|
||||||
else
|
if (!tPath || !*tPath) {
|
||||||
*this = tPath;
|
tPath = PR_GetEnv("TMP");
|
||||||
}
|
if (!tPath || !*tPath) {
|
||||||
|
tPath = PR_GetEnv("TEMP");
|
||||||
|
if (!tPath || !*tPath) {
|
||||||
|
tPath = "/tmp/";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*this = tPath;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче