Skip to content

Commit c93549d

Browse files
committed
fix: 兼容其他安装位置的Hearthstone
1 parent b6fc8b1 commit c93549d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/skipper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ void Skipper::skip() const {
5656
}
5757
std::string connection_to_kill;
5858
for (auto obj : json_document["connections"].toArray()) {
59-
if (obj.isObject() && obj.toObject()["metadata"].toObject()["processPath"] ==
60-
"/Applications/Hearthstone/Hearthstone.app/Contents/MacOS/Hearthstone" && obj.
61-
toObject()["metadata"].toObject()["host"] == "") {
59+
if (obj.isObject() && obj.toObject()["metadata"].toObject()["processPath"].toString()
60+
.endsWith("Hearthstone.app/Contents/MacOS/Hearthstone") &&
61+
obj.toObject()["metadata"].toObject()["host"] == "") {
6262
connection_to_kill = obj.toObject()["id"].toString().toStdString();
6363
SPDLOG_LOGGER_INFO(_logger, "Connection to kill {}", connection_to_kill);
6464
}

0 commit comments

Comments
 (0)