mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 09:55:56 +08:00
refactor: 代码清理 — 删除 AppError、重命名 replacePaths、修正 detectExportFormat、统一 PATH 长度、优化 BOM 检查、添加同步注释
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,8 @@ pub fn save_user_paths(paths: Vec<String>) -> Result<(), String> {
|
||||
save_paths(HKEY_CURRENT_USER, USER_REG_PATH, "用户", &paths)
|
||||
}
|
||||
|
||||
/// 将分号分隔的 PATH 字符串拆分为数组。
|
||||
/// 注意:TS 端 src/core/validation.ts 有相同逻辑的 split_path,修改时需同步两端。
|
||||
pub(crate) fn split_path(raw: &str) -> Vec<String> {
|
||||
raw.split(';')
|
||||
.map(|s| s.trim().to_string())
|
||||
|
||||
Reference in New Issue
Block a user