On Fri, Apr 8, 2011 at 2:40 PM, David Sommerseth <dav...@redhat.com> wrote:
> +
> +  envptr = getenv(SYS_PATH_ENV_VAR_NAME);
> +  if( !envptr ) {
> +    /* This indicates something is really wrong with the Windows
> +     * environment, and we shouldn't try to start OpenVPN in this case
> +     */
> +    msg (M_FATAL, "Could not find %%%s%% environment variable",
> +         SYS_PATH_ENV_VAR_NAME);
> +    return NULL; /* Just in case M_FATAL doesn't exit() */
> +  }
> +
> +  openvpn_snprintf(tmpdir, 256, "%.249s\\Temp", envptr);
> +  msg (M_WARN, "Could not find %%TEMP%% or %%TMP%% environment variables.  "
> +       "Falling back to %s.  Consider to use --tmp-dir", tmpdir);
>   return tmpdir;
>  }

Why something wrong with Windows?
This is incorrect.
Also, there should be no warning, as it perfectly standard location.
And I don't see ExpandEnvironmentVariables() usage, I expected to have
something to expand %SystemRoot%.

Reply via email to