fix(portable): 避免数据目录切换时丢失设置和代码片段 - #6771
Draft
zipg wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Windows 便携版的数据目录发生切换时,启动兜底迁移仅将连接、历史和 SQL 库等表识别为用户数据。
app_settings和app_state未被识别,导致仅保存了设置或自定义代码片段的数据库被误判为空,启动后表现为恢复默认。修复
验证
cargo test -p dbx-core import_user_data_db --lib:7 passedcargo test -p dbx-core --lib:5164 passed, 0 failed, 59 ignored(变基前全量验证)cargo test --manifest-path src-tauri/Cargo.toml data_dir --lib:9 passed(变基前验证)cargo fmt --all -- --checkgit diff --check待验证
当前开发环境为 macOS,尚未完成 Windows 便携版实际退出、重启及数据目录切换验证,因此先提交为草稿 PR。