mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-12 23:44:21 +00:00
Use new Sys_SetEnv here
This commit is contained in:
parent
568cf2732a
commit
4ba2452f83
1 changed files with 1 additions and 9 deletions
|
@ -2362,15 +2362,7 @@ void Com_Setenv_f(void)
|
||||||
{
|
{
|
||||||
char *arg2 = Cmd_ArgsFrom(2);
|
char *arg2 = Cmd_ArgsFrom(2);
|
||||||
|
|
||||||
#ifdef _WIN32
|
Sys_SetEnv(arg1, arg2);
|
||||||
// windows already removes env variable if value is an empty string
|
|
||||||
_putenv(va("%s=%s", arg1, arg2));
|
|
||||||
#else
|
|
||||||
if(!*arg2)
|
|
||||||
unsetenv(arg1);
|
|
||||||
else
|
|
||||||
setenv(arg1, arg2, 1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else if(argc == 2)
|
else if(argc == 2)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue