This didn't help, bookmarks disappeared succesfully with this patch too. This time file contained lastly added bookmark in section ":s0: Unclassified" (this section didn't exist before) and i think that it happened, when i added this bookmark. On Mon, 24 Feb 2003, madis wrote:
On Sun, 23 Feb 2003, John Bradford wrote:
Since I started using using 7.0, my bookmarks have been lost on four occasions, but I haven't been able to reproduce the bug at will - has anybody else noticed this?
Yes, once (not a much help for bughunt) and resulted in zero-length bm.txt. Although this isn't a real fix, i thought now, that saveing into temporary file and renameing it after close may help to avoid damage when bm_srv crashes during save. Probably some error checking should be also added.
--- cvs/dillo/dpi/bm_srv12.c 2003-02-16 18:45:54.000000000 +0200 +++ dillo/dpi/bm_srv12.c 2003-02-24 04:28:59.000000000 +0200 @@ -851,10 +851,12 @@ int Bms_save() BmSec *sec_node; GSList *list, *list2; GString *gstr = g_string_new(""); + gchar *BmTmp; struct stat TimeStamp;
+ BmTmp = g_strconcat(BmFile, ".tmp", NULL); /* open bm file */ - if (!(BmTxt = fopen(BmFile, "w"))) { + if (!(BmTxt = fopen(BmTmp, "w"))) { perror("[fopen]"); return 1; } @@ -884,6 +886,8 @@ int Bms_save()
g_string_free(gstr, TRUE); fclose(BmTxt); + rename(BmTmp, BmFile); + g_free(BmTmp);
/* keep track of the timestamp */ stat(BmFile, &TimeStamp);
_______________________________________________ Dillo-dev mailing list Dillo-dev@lists.auriga.wearlab.de http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev