Skip to content

Commit

Permalink
Use sqlite as cookie storage #470.
Browse files Browse the repository at this point in the history
There are some reports about randomly cleared cookie file which seems to
be fixed by using sqlite instead of text base cookie storage.
  • Loading branch information
fanglingsu committed May 2, 2018
1 parent f20cbce commit c3da251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions doc/vimb.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 */
Expand Down

0 comments on commit c3da251

Please sign in to comment.