fix: 檔案列表 name matching fallback — path 不匹配時改用 name 比對(處理 symlink 路徑差異)
This commit is contained in:
@@ -202,8 +202,10 @@ async fn list_files(
|
||||
|
||||
let name = mb_file.name;
|
||||
let mb_path = mb_file.file_path.clone().unwrap_or_default();
|
||||
// Try path match first, then fall back to name match
|
||||
// (handles symlink paths where MarkBase returns different path than registered)
|
||||
let matched = if !mb_path.is_empty() {
|
||||
registered_by_path.get(&mb_path)
|
||||
registered_by_path.get(&mb_path).or_else(|| registered_by_name.get(&name))
|
||||
} else {
|
||||
registered_by_name.get(&name)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user