fix(linux): detect xwechat data under .xwechat

pull/99/head
zzgz 2026-06-05 17:33:36 +08:00
parent 08af894594
commit 1a638c8510
1 changed files with 7 additions and 2 deletions

View File

@ -260,8 +260,13 @@ fn detect_db_dir_impl() -> Option<PathBuf> {
let mut candidates: Vec<PathBuf> = Vec::new();
for base_home in [Some(home.clone()), sudo_home].into_iter().flatten() {
let xwechat = base_home.join("Documents/xwechat_files");
if xwechat.exists() {
for xwechat in [
base_home.join("Documents/xwechat_files"),
base_home.join(".xwechat/xwechat_files"),
] {
if !xwechat.exists() {
continue;
}
if let Ok(entries) = std::fs::read_dir(&xwechat) {
for entry in entries.flatten() {
let storage = entry.path().join("db_storage");