mirror of https://github.com/MidnightCommander/mc
(mc_tmpdir): use $MC_TMPDIR if set.
This commit is contained in:
parent
7b5b56104b
commit
faa195ae59
|
@ -818,9 +818,13 @@ mc_tmpdir (void)
|
|||
st.st_uid == getuid () && (st.st_mode & 0777) == 0700)
|
||||
return tmpdir;
|
||||
|
||||
sys_tmp = getenv ("TMPDIR");
|
||||
sys_tmp = getenv ("MC_TMPDIR");
|
||||
if (sys_tmp == NULL || !IS_PATH_SEP (sys_tmp[0]))
|
||||
sys_tmp = TMPDIR_DEFAULT;
|
||||
{
|
||||
sys_tmp = getenv ("TMPDIR");
|
||||
if (sys_tmp == NULL || !IS_PATH_SEP (sys_tmp[0]))
|
||||
sys_tmp = TMPDIR_DEFAULT;
|
||||
}
|
||||
|
||||
pwd = getpwuid (getuid ());
|
||||
if (pwd != NULL)
|
||||
|
|
Loading…
Reference in New Issue