mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 10:57:45 +08:00
fix: 自动战斗在未存在 debug/map 路径时无法生成地图截图
This commit is contained in:
@@ -750,7 +750,7 @@ void asst::BattleHelper::save_map(const cv::Mat& image)
|
||||
|
||||
// 清理旧的 PNG 文件
|
||||
static bool clean_png = true;
|
||||
if (clean_png) {
|
||||
if (clean_png && std::filesystem::exists(MapRelativeDir)) {
|
||||
for (const auto& entry : std::filesystem::directory_iterator(MapRelativeDir)) {
|
||||
if (entry.path().extension() == ".png") {
|
||||
std::error_code ec;
|
||||
|
||||
Reference in New Issue
Block a user