mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
No need to check whether the TEMP var is already set, it suffices
using false as the third parameter to setenv for not having it replaced when already set. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19336 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
98b3d68393
commit
806385246b
@ -148,18 +148,7 @@ void os::init(int, char *[])
|
||||
// Make sure that the TEMP variable is set
|
||||
// and sync the Windows environment.
|
||||
|
||||
char **envp = environ;
|
||||
string var;
|
||||
bool temp_seen = false;
|
||||
|
||||
while (envp && *envp && !temp_seen) {
|
||||
split(*envp++, var, '=');
|
||||
if (var == "TEMP")
|
||||
temp_seen = true;
|
||||
}
|
||||
if (!temp_seen)
|
||||
::setenv("TEMP", "/tmp", true);
|
||||
|
||||
setenv("TEMP", "/tmp", false);
|
||||
cygwin_internal(CW_SYNC_WINENV);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user