From a37ef882b493ab4f89690e5b93e82905d15997d8 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Wed, 9 Jun 2021 14:27:07 -0400 Subject: [PATCH] Fix cookie database path --- Makefile | 6 +++--- man/chorizo.1.scd | 4 ++++ src/browser.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index abc30a3..8528f6a 100644 --- a/Makefile +++ b/Makefile @@ -43,11 +43,11 @@ install: all $(datadir)/chorizo/user-scripts \ $(datadir)/applications - cp chorizo $(bindir)/chorizo + cp chorizo $(bindir)/ cp man/*.1 $(mandir)/man1/ cp man/*.5 $(mandir)/man5/ - cp chorizo.ini $(confdir)/chorizo.ini - cp chorizo.desktop $(datadir)/applications/chorizo.ini + cp chorizo.ini $(confdir)/ + cp chorizo.desktop $(datadir)/applications/ cp -r extensions/*.so $(libdir)/chorizo/web_extensions/ cp -r user-scripts/* $(datadir)/chorizo/user-scripts/ diff --git a/man/chorizo.1.scd b/man/chorizo.1.scd index 87ef0f9..45048ba 100644 --- a/man/chorizo.1.scd +++ b/man/chorizo.1.scd @@ -48,6 +48,10 @@ XDG variables will be used to construct these paths. *~/.local/share/chorizo/certs* Directory where trusted certificates are stored. See *chorizo-usage*(1). +*~/.local/share/chorizo/cookies.db* + Database where cookies are stored. It is kept in the same format as Firefox, + so the file can easily be copied over. + ~/.local/share/chorizo/user-scripts Directory to store user-supplied JavaScript snippets. See *chorizo-usage*(1). diff --git a/src/browser.c b/src/browser.c index 4542eb7..669ba60 100644 --- a/src/browser.c +++ b/src/browser.c @@ -709,7 +709,7 @@ init_default_web_context(void) { if (!cfg.private) { webkit_web_context_set_favicon_database_directory(wc, NULL); - gchar *fname = g_build_filename("/", g_get_user_cache_dir(), __NAME__, + gchar *fname = g_build_filename("/", g_get_user_data_dir(), __NAME__, "cookies.db", NULL); WebKitCookiePersistentStorage type = WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE; -- 2.39.2