Skip to content

Commit

Permalink
chore: 加点log,一点小优化
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Jun 14, 2024
1 parent 77c6514 commit 14d9cd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/MaaAdbControlUnit/Base/ProcessArgvGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@ std::optional<ProcessArgvGenerator::ProcessArgv>
string_replace_all_(s, replacement);
}

auto stdpath = MAA_NS::path(res.front());
std::filesystem::path abs_path;
if (stdpath.is_absolute()) {
abs_path = stdpath;
if (auto raw_path = MAA_NS::path(res.front()); raw_path.is_absolute()) {
abs_path = raw_path;
}
else {
abs_path = boost::process::search_path(stdpath);
abs_path = boost::process::search_path(raw_path);
}

if (!std::filesystem::exists(abs_path)) {
Expand Down
2 changes: 2 additions & 0 deletions source/MaaToolkit/AdbDevice/DeviceMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ std::vector<std::string> DeviceMgr::request_adb_serials(
std::vector<std::string> devices;
auto found = control_unit->find_device(devices);

LogDebug << VAR(devices);

if (!found) {
LogError << "Failed to find_device";
return {};
Expand Down

0 comments on commit 14d9cd8

Please sign in to comment.