Use sqlite as cookie storage #470.
authorDaniel Carl <danielcarl@gmx.de>
Wed, 2 May 2018 20:39:24 +0000 (22:39 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Wed, 2 May 2018 20:39:24 +0000 (22:39 +0200)
There are some reports about randomly cleared cookie file which seems to
be fixed by using sqlite instead of text base cookie storage.

doc/vimb.1
src/main.c

index 7504fab..cb3ee95 100644 (file)
@@ -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.
index 1e6657b..50300de 100644 (file)
@@ -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 */