cedric pushed a commit to branch enlightenment-0.17. http://git.enlightenment.org/core/enlightenment.git/commit/?id=398ba57728fea111136a4a5cc44ed212d1ae2381
commit 398ba57728fea111136a4a5cc44ed212d1ae2381 Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Wed May 27 08:43:13 2015 +0900 e start - path manipulation - don't add a : if there already is one avoids adding more : chars to make a broken path even worse --- src/bin/e_start_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c index 507a2da..351fb78 100644 --- a/src/bin/e_start_main.c +++ b/src/bin/e_start_main.c @@ -174,7 +174,7 @@ _env_path_prepend(const char *env, const char *path) strcat(s, p2); if (p) { - strcat(s, ":"); + if (p[0] != ':') strcat(s, ":"); strcat(s, p); } env_set(env, s); @@ -211,7 +211,10 @@ _env_path_append(const char *env, const char *path) if (p) { strcat(s, p); - strcat(s, ":"); + if (len > 0) + { + if (s[len - 1] != ':') strcat(s, ":"); + } } strcat(s, p2); env_set(env, s); --
