mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-12 19:06:36 +00:00
fix for enviroment variable expansion
This commit is contained in:
parent
6bc19d0396
commit
fb8ccd7a05
12
src/conky.c
12
src/conky.c
@ -2825,13 +2825,17 @@ static int extract_variable_text_internal(struct text_object *retval, const char
|
|||||||
}
|
}
|
||||||
s = p;
|
s = p;
|
||||||
|
|
||||||
|
/* search for variable in environment */
|
||||||
|
|
||||||
var = getenv(buf);
|
var = getenv(buf);
|
||||||
|
if (var) {
|
||||||
|
obj = create_plain_text(var);
|
||||||
|
if (obj)
|
||||||
|
append_object(retval, obj);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* if variable wasn't found in environment, use some special */
|
/* if variable wasn't found in environment, use some special */
|
||||||
if (var) {
|
|
||||||
strncpy(buf, var, 255);
|
|
||||||
}
|
|
||||||
arg = 0;
|
|
||||||
|
|
||||||
/* split arg */
|
/* split arg */
|
||||||
if (strchr(buf, ' ')) {
|
if (strchr(buf, ' ')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user