1
0
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:
Phil Sutter 2009-04-26 22:38:03 +02:00 committed by Phil Sutter
parent 6bc19d0396
commit fb8ccd7a05

View File

@ -2825,13 +2825,17 @@ static int extract_variable_text_internal(struct text_object *retval, const char
}
s = p;
/* search for variable in environment */
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 (var) {
strncpy(buf, var, 255);
}
arg = 0;
/* split arg */
if (strchr(buf, ' ')) {