WebPositive: save the cookie jar in the user settings directory also for the curl backend
The files and formats are different for libnetservices and curl backends, but now they are under the same directory whatever the installed haikuwebkit version uses. Change-Id: Iab87d5fd27ebea1fa0a8967a9802dfa2fb11240a Reviewed-on: https://review.haiku-os.org/c/haiku/+/5835 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
652d5f6347
commit
753349fb2e
@ -65,8 +65,6 @@ const char* kApplicationSignature = "application/x-vnd.Haiku-WebPositive";
|
||||
const char* kApplicationName = B_TRANSLATE_SYSTEM_NAME("WebPositive");
|
||||
static const uint32 PRELOAD_BROWSING_HISTORY = 'plbh';
|
||||
|
||||
#define ENABLE_NATIVE_COOKIES 1
|
||||
|
||||
|
||||
BrowserApp::BrowserApp()
|
||||
:
|
||||
@ -99,7 +97,6 @@ BrowserApp::BrowserApp()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLE_NATIVE_COOKIES
|
||||
BString cookieStorePath = kApplicationName;
|
||||
cookieStorePath << "/Cookies";
|
||||
fCookies = new SettingsMessage(B_USER_SETTINGS_DIRECTORY,
|
||||
@ -110,7 +107,14 @@ BrowserApp::BrowserApp()
|
||||
fContext->SetCookieJar(
|
||||
BPrivate::Network::BNetworkCookieJar(&cookieArchive));
|
||||
}
|
||||
#endif
|
||||
|
||||
BPath curlCookies;
|
||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &curlCookies) == B_OK
|
||||
&& curlCookies.Append(kApplicationName) == B_OK
|
||||
&& curlCookies.Append("cookie.jar.db") == B_OK) {
|
||||
|
||||
setenv("CURL_COOKIE_JAR_PATH", curlCookies.Path(), 0);
|
||||
}
|
||||
|
||||
BString sessionStorePath = kApplicationName;
|
||||
sessionStorePath << "/Session";
|
||||
|
Loading…
Reference in New Issue
Block a user