- 当未指定输入文件时使用-a参数仍然可以打开输出目录

- 更换终端彩色库以支持Windows默认不启用ANSI转义序列的终端
This commit is contained in:
lkhsss
2025-09-07 14:59:35 +08:00
parent f35deaef80
commit 122d4e251d
9 changed files with 356 additions and 107 deletions

View File

@ -14,6 +14,7 @@ pub enum AppError {
FileDataError,
SaveError,
SystemTimeError,
CannotCreateDir,
}
impl std::error::Error for AppError {}
@ -34,8 +35,8 @@ impl std::fmt::Display for AppError {
Self::FileDataError => "处理文件数据时出错",
Self::SaveError => "保存文件出错",
Self::SystemTimeError => "获取时间戳失败",
// _ => "未知错误",
Self::CannotCreateDir => "无法创建父级目录", // _ => "未知错误",
};
write!(f, "{}", result)
}
}
}