mirror of
https://github.com/Drop-OSS/wry-cef.git
synced 2026-01-30 20:55:24 +01:00
fix: set WebKitGTK WebsiteDataManager's base_cache_directory (#1547)
Co-authored-by: Fabian-Lars <github@fabianlars.de>
This commit is contained in:
7
.changes/webcontext-cache-directory.md
Normal file
7
.changes/webcontext-cache-directory.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"wry": patch
|
||||
---
|
||||
|
||||
Set `WebsiteDataManagerBuilder::base_cache_directory` with the same path as `base_data_directory`.
|
||||
|
||||
This change allows the cache directory to be changed instead of using the default one [from WebKitGTK](https://webkitgtk.org/reference/webkit2gtk/stable/property.WebsiteDataManager.base-cache-directory.html).
|
||||
@@ -34,6 +34,8 @@ impl WebContextImpl {
|
||||
let mut context_builder = WebContext::builder();
|
||||
if let Some(data_directory) = data_directory {
|
||||
let data_manager = WebsiteDataManager::builder()
|
||||
// TODO: Consider taking a cache_directory so this can be in XDG_CACHE_HOME.
|
||||
.base_cache_directory(data_directory.to_string_lossy())
|
||||
.base_data_directory(data_directory.to_string_lossy())
|
||||
.build();
|
||||
if let Some(cookie_manager) = data_manager.cookie_manager() {
|
||||
|
||||
Reference in New Issue
Block a user