From: Daniel Carl Date: Wed, 2 May 2018 20:39:24 +0000 (+0200) Subject: Use sqlite as cookie storage #470. X-Git-Url: https://git.owens.tech/git.owens.tech/git.owens.tech/git?a=commitdiff_plain;h=c3da25109ddcb344da90743308b9eb0d4ff1e512;p=vimb.git Use sqlite as cookie storage #470. There are some reports about randomly cleared cookie file which seems to be fixed by using sqlite instead of text base cookie storage. --- diff --git a/doc/vimb.1 b/doc/vimb.1 index 7504fab..cb3ee95 100644 --- a/doc/vimb.1 +++ b/doc/vimb.1 @@ -703,11 +703,9 @@ Fired right after a download is started. .TP .B DownloadFinished Fired if a Vimb managed download is finished. -For external download this event is not available. .TP .B DownloadFailed Fired if a Vimb managed download failed. -For external download this event is not available. .PD .RE .TP @@ -1320,8 +1318,8 @@ this subdirectory. .I config Configuration file to set WebKit setting, some GUI styles and keybindings. .TP -.I cookies -Cookie store file. +.I cookies.db +Sqlite cookie storage. .TP .I closed Holds the URIs of last closed browser windows. diff --git a/src/main.c b/src/main.c index 1e6657b..50300de 100644 --- a/src/main.c +++ b/src/main.c @@ -1611,7 +1611,7 @@ static void vimb_setup(void) /* Setup those files that are use multiple time during runtime */ vb.files[FILES_CLOSED] = util_get_filepath(path, "closed", TRUE); - vb.files[FILES_COOKIE] = util_get_filepath(path, "cookies", TRUE); + vb.files[FILES_COOKIE] = util_get_filepath(path, "cookies.db", TRUE); vb.files[FILES_USER_STYLE] = util_get_filepath(path, "style.css", FALSE); vb.files[FILES_SCRIPT] = util_get_filepath(path, "scripts.js", FALSE); vb.files[FILES_HISTORY] = util_get_filepath(path, "history", TRUE); @@ -1636,7 +1636,7 @@ static void vimb_setup(void) webkit_cookie_manager_set_persistent_storage( cm, vb.files[FILES_COOKIE], - WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT); + WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE); } /* initialize the modes */