From 0fd12297997f598e4893e8f5b6e235b09cedec09 Mon Sep 17 00:00:00 2001 From: Lloyd Zhou Date: Thu, 26 Sep 2024 11:11:27 +0800 Subject: [PATCH] fix(linux): fix incorrect path for indexeddb database directory (#1369) --- .changes/fixed-data_directory-error-for-webkitgtk.md | 5 +++++ src/webkitgtk/web_context.rs | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 .changes/fixed-data_directory-error-for-webkitgtk.md diff --git a/.changes/fixed-data_directory-error-for-webkitgtk.md b/.changes/fixed-data_directory-error-for-webkitgtk.md new file mode 100644 index 000000000..b64495c82 --- /dev/null +++ b/.changes/fixed-data_directory-error-for-webkitgtk.md @@ -0,0 +1,5 @@ +--- +"wry": patch +--- + +On Linux, fixed incorrect path for indexeddb database directory which made apps using `wry@0.24` and `tauri@1` migrating to `wry@>=0.38` and `tauri@2` lose their indexeddb data. diff --git a/src/webkitgtk/web_context.rs b/src/webkitgtk/web_context.rs index ae7fe834b..2971b033b 100644 --- a/src/webkitgtk/web_context.rs +++ b/src/webkitgtk/web_context.rs @@ -40,12 +40,7 @@ impl WebContextImpl { let mut context_builder = WebContext::builder(); if let Some(data_directory) = data.data_directory() { let data_manager = WebsiteDataManager::builder() - .base_data_directory( - data_directory - .join("databases") - .join("indexeddb") - .to_string_lossy(), - ) + .base_data_directory(data_directory.to_string_lossy()) .build(); if let Some(cookie_manager) = data_manager.cookie_manager() { cookie_manager.set_persistent_storage(