mirror of
https://github.com/jackwener/wx-cli.git
synced 2026-10-08 18:45:45 +00:00
fix(linux): detect xwechat data under .xwechat
This commit is contained in:
+7
-2
@@ -260,8 +260,13 @@ fn detect_db_dir_impl() -> Option<PathBuf> {
|
|||||||
|
|
||||||
let mut candidates: Vec<PathBuf> = Vec::new();
|
let mut candidates: Vec<PathBuf> = Vec::new();
|
||||||
for base_home in [Some(home.clone()), sudo_home].into_iter().flatten() {
|
for base_home in [Some(home.clone()), sudo_home].into_iter().flatten() {
|
||||||
let xwechat = base_home.join("Documents/xwechat_files");
|
for xwechat in [
|
||||||
if xwechat.exists() {
|
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) {
|
if let Ok(entries) = std::fs::read_dir(&xwechat) {
|
||||||
for entry in entries.flatten() {
|
for entry in entries.flatten() {
|
||||||
let storage = entry.path().join("db_storage");
|
let storage = entry.path().join("db_storage");
|
||||||
|
|||||||
Reference in New Issue
Block a user