mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-05 02:12:48 +08:00
Fix common util judge error (#835)
* '#831 fix exe_path judge error' * #831 fix exe_path judge error
This commit is contained in:
parent
09701c3f2b
commit
546a1fcb74
@ -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 + "/";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user