mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-05 21:07:52 +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:
parent
39071d28e8
commit
0632693be7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user