Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(linux): fix incorrect path for indexeddb database directory #1369

Merged
merged 6 commits into from
Sep 26, 2024

Conversation

lloydzhou
Copy link
Contributor

when migrate from v1 to v2, linux version (using webkitgtk) can not get old data (like indexeddb)

image

@lloydzhou lloydzhou requested a review from a team as a code owner September 25, 2024 08:45
@lloydzhou lloydzhou changed the title fixed data_directory error for webkitgtk fix(linux) data_directory error for webkitgtk Sep 25, 2024
Copy link
Contributor

github-actions bot commented Sep 25, 2024

Package Changes Through f5104eb

There are 1 changes which include wry with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
wry 0.44.1 0.45.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@FabianLars
Copy link
Member

Thanks for contributing! Apart frome the failing format check worklow, could you please also add a changefile like this? https://github.com/tauri-apps/wry/blob/5111eb013e1b049d12aad38b96b2017a4fc54c72/.changes/fix-clear-browsing-data-macos.md

@amrbashir
Copy link
Member

The paths looks the same to me in v1

&data_directory
.join("databases")
.join("indexeddb")
.to_string_lossy(),
and v2
data_directory
.join("databases")
.join("indexeddb")
.to_string_lossy(),
)

Was this changed internally in webkit2gtk? do you have a link to that change?

@lloydzhou
Copy link
Contributor Author

i have using tauri build NextChat.

on linux, the data_directory is ~/.local/share/com.yida.chatgpt.next.web

so the indexeddb directory is ~/.local/share/com.yida.chatgpt.next.web/databases/indexeddb

when i upgrade to tauri@v2 in this Pull Request, then the data_directory is ~/.local/share/com.yida.chatgpt.next.web/databases/indexeddb

now the indexeddb directory is ~/.local/share/com.yida.chatgpt.next.web/databases/indexeddb/databases/indexeddb

i have upload the screenshot on the head.

@lloydzhou
Copy link
Contributor Author

i just see the version for wry in src-tauri/Cargo.lock for this project is 0.24.7, this version, do not include webkitgtk...

@amrbashir
Copy link
Member

the repo structure is a bit different, see https://github.com/tauri-apps/wry/tree/wry-v0.24.7/src/webview/webkitgtk

@amrbashir
Copy link
Member

i have using tauri build NextChat.

on linux, the data_directory is ~/.local/share/com.yida.chatgpt.next.web

so the indexeddb directory is ~/.local/share/com.yida.chatgpt.next.web/databases/indexeddb

when i upgrade to tauri@v2 in this Pull Request, then the data_directory is ~/.local/share/com.yida.chatgpt.next.web/databases/indexeddb

now the indexeddb directory is ~/.local/share/com.yida.chatgpt.next.web/databases/indexeddb/databases/indexeddb

i have upload the screenshot on the head.

I understand that the directories has changed for your app indeed but this was not due to a change in our code and it looks like maybe a recent webkit2gtk version may have changed the default behavior. This will need to be properly investigated rather than simply working around it.

@amrbashir
Copy link
Member

Oh nvm, I see the problem. In v1, we were setting indexeddb_directory but in v2, we are setting base_data_directory which ofc results in the extra path.

amrbashir
amrbashir previously approved these changes Sep 26, 2024
@amrbashir amrbashir changed the title fix(linux) data_directory error for webkitgtk fix(linux): fix incorrect path for indexeddb database directory Sep 26, 2024
@amrbashir amrbashir merged commit 0fd1229 into tauri-apps:dev Sep 26, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants