fix.修复adb连接重构后的一些问题

This commit is contained in:
MistEO
2022-02-26 20:48:53 +08:00
parent d71ae30ae7
commit f6909094ae
5 changed files with 26 additions and 35 deletions

View File

@@ -629,13 +629,13 @@ bool asst::Controller::connect(const std::string & adb_path, const std::string &
auto cmd_replace = [&](const std::string& cfg_cmd) -> std::string {
const std::unordered_map<std::string, std::string> replacements = {
{"[Adb]", address},
{"[Adb]", adb_path},
{"[Address]", address},
{"[DisplayId]", display_id}
};
std::string formatted = cfg_cmd;
for (const auto& [key, value] : replacements) {
utils::string_replace_all(formatted, key, value);
formatted = utils::string_replace_all(formatted, key, value);
}
return formatted;
};