Fix bug in $if_existing.
authorBrenden Matthews <brenden@diddyinc.com>
Wed, 7 Apr 2010 17:14:45 +0000 (10:14 -0700)
committerBrenden Matthews <brenden@diddyinc.com>
Wed, 7 Apr 2010 17:14:45 +0000 (10:14 -0700)
Ref:
http://sourceforge.net/tracker/?func=detail&aid=2979974&group_id=143975&atid=757308

src/conky.c

index 7e61f51..790e93c 100644 (file)
@@ -463,7 +463,7 @@ int check_contains(char *f, char *s)
                }
                fclose(where);
        } else {
-               NORM_ERR("Could not open the file");
+               NORM_ERR("Could not open the file '%s'", f);
        }
        return ret;
 }
@@ -1330,7 +1330,7 @@ void generate_text_internal(char *p, int p_max_size,
                                        DO_JUMP;
                                } else if (spc) {
                                        *spc = '\0';
-                                       if (check_contains(obj->data.s, spc + 1))
+                                       if (!check_contains(obj->data.s, spc + 1))
                                                DO_JUMP;
                                        *spc = ' ';
                                }