diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2015-05-27 08:43:13 +0900 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-08-17 18:10:12 +0200 |
commit | 398ba57728fea111136a4a5cc44ed212d1ae2381 (patch) | |
tree | 372946d54c9c93f24562ecc1dd3cf2ec3284b531 | |
parent | b2e1a0657bdccc8f264e4d02864d8b9f3a925b93 (diff) | |
download | enlightenment-398ba57728fea111136a4a5cc44ed212d1ae2381.tar.gz |
e start - path manipulation - don't add a : if there already is one
avoids adding more : chars to make a broken path even worse
-rw-r--r-- | src/bin/e_start_main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c index 507a2da523..351fb783b9 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); |