提交 546a1fcb 编写于 作者: A ABNER-1 提交者: Jin Hai

Fix common util judge error (#835)

*  '#831 fix exe_path judge error'

* #831 fix exe_path judge error
上级 09701c3f
......@@ -8,6 +8,7 @@ Please mark all change in change log and use the issue from GitHub
- \#715 - Milvus crash when searching and building index simultaneously using SQ8H
- \#744 - Don't return partition table for show_tables
- \#770 - Server unittest run failed on low-end server
- \#831 - Judge branch error in CommonUtil.cpp
## Feature
- \#216 - Add CLI to get server info
......
......@@ -190,7 +190,7 @@ CommonUtil::GetExePath() {
buf[cnt] = '\0';
std::string exe_path = buf;
if (exe_path.rfind('/') != exe_path.length()) {
if (exe_path.rfind('/') != exe_path.length() - 1) {
std::string sub_str = exe_path.substr(0, exe_path.rfind('/'));
return sub_str + "/";
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册