updated on Tue Jan 24 08:00:27 UTC 2012
[aur-mirror.git] / lxdm-svn / 15-path-replace.patch
blobe458cef27dce10b01a3b6c7485b4d130a5267c55
1 Index: lxdm-svn/src/lxdm.c
2 ===================================================================
3 --- lxdm-svn/src/lxdm.c (revision 2334)
4 +++ lxdm-svn/src/lxdm.c (working copy)
5 @@ -873,10 +873,10 @@
7 /* override $PATH if needed */
8 path = g_key_file_get_string(config, "base", "path", 0);
9 - if( G_UNLIKELY(path) && path[0] )
10 - replace_env(env, "PATH=", path);
11 - else
12 - replace_env(env, "PATH=","/usr/local/bin:/bin:/usr/bin");
13 + if( G_UNLIKELY(path) && path[0] ) /* if PATH is specified in config file */
14 + replace_env(env, "PATH=", path); /* override current $PATH with config value */
15 + else if(!getenv("PATH")) /* if PATH is not set */
16 + replace_env(env, "PATH=", "/usr/local/bin:/bin:/usr/bin"); /* set proper default */
17 g_free(path);
18 /* optionally override $LANG, $LC_MESSAGES, and $LANGUAGE */
19 if( lang && lang[0] )