mirror of https://github.com/jackwener/wx-cli.git
fix(linux): detect xwechat data under .xwechat
parent
08af894594
commit
1a638c8510
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue