1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 05:29:11 +00:00

Fix if_existing

The if_existing with 2 arguments checking whether a file contains a specified
string did not work. This is fixed by this patch.

Signed-off-by: Brenden Matthews <brenden@rty.ca>
This commit is contained in:
Alexander Graf 2009-05-30 22:20:16 +02:00 committed by Brenden Matthews
parent 39071d28e8
commit 0632693be7

View File

@ -412,11 +412,10 @@ int check_contains(char *f, char *s)
FILE *where = open_file(f, 0);
if (where) {
char buf1[256], buf2[256];
char buf1[256];
while (fgets(buf1, 256, where)) {
sscanf(buf1, "%255s", buf2);
if (strstr(buf2, s)) {
if (strstr(buf1, s)) {
ret = 1;
break;
}