On Thu, Jun 25, 2009 at 07:20:27PM +0000, corvid wrote:
Michal wrote:
cookies.c: + rc = fgets(line, LINE_MAXLEN, stream); + if (!rc) { + MSG("Cookies: Error while reading rule from cookiesrc\n"); + /* (Partially) corrupted file? Skip this unreadable line */ + continue; + }
The idea was to read all the lines with rules and skip those unreadable, so we have the rules before and after the unreadable part. But - can something like this happen? And will it in reality perform like I expect in the code?
Another quirk I found is that I always receive one this line at Dillo start:
Cookies: Error while reading rule from cookiesrc
I guess there's some problem with EOF handling.
I think I would just loop while the return from fgets() > 0 and then give an error if ferror(stream) is nonzero.
Committed with modifications. Please check it. -- Cheers Jorge.-