forked from enlightenment/enlightenment
e start - path manipulation - don't add a : if there already is one
avoids adding more : chars to make a broken path even worse
This commit is contained in:
parent
6ba90335e2
commit
b3cc1dc364
|
@ -215,7 +215,7 @@ _env_path_prepend(const char *env, const char *path)
|
||||||
strcat(s, p2);
|
strcat(s, p2);
|
||||||
if (p)
|
if (p)
|
||||||
{
|
{
|
||||||
strcat(s, ":");
|
if (p[0] != ':') strcat(s, ":");
|
||||||
strcat(s, p);
|
strcat(s, p);
|
||||||
}
|
}
|
||||||
env_set(env, s);
|
env_set(env, s);
|
||||||
|
@ -252,7 +252,10 @@ _env_path_append(const char *env, const char *path)
|
||||||
if (p)
|
if (p)
|
||||||
{
|
{
|
||||||
strcat(s, p);
|
strcat(s, p);
|
||||||
strcat(s, ":");
|
if (len > 0)
|
||||||
|
{
|
||||||
|
if (s[len - 1] != ':') strcat(s, ":");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
strcat(s, p2);
|
strcat(s, p2);
|
||||||
env_set(env, s);
|
env_set(env, s);
|
||||||
|
|
Loading…
Reference in New Issue