From: Enrico Forestieri Date: Mon, 6 Aug 2007 14:17:43 +0000 (+0000) Subject: No need to check whether the TEMP var is already set, it suffices X-Git-Tag: 1.6.10~9016 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f6504c4fff1c10a8a6b245573d65fff1b86a2e72;p=lyx.git 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/trunk@19335 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/support/os_cygwin.cpp b/src/support/os_cygwin.cpp index d8d052fe97..c11a6fdc08 100644 --- a/src/support/os_cygwin.cpp +++ b/src/support/os_cygwin.cpp @@ -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); }