未验证 提交 0286fab5 编写于 作者: wafwerar's avatar wafwerar 提交者: GitHub

fix: func basename error (#17547)

* fix: func basename error

* chore: add cargo update
Co-authored-by: sangshuduo's avatarShuduo Sang <sangshuduo@gmail.com>
上级 5f30656c
...@@ -118,6 +118,7 @@ function kill_taosd() { ...@@ -118,6 +118,7 @@ function kill_taosd() {
} }
function install_include() { function install_include() {
${csudo}mkdir -p ${inc_link_dir}
${csudo}rm -f ${inc_link_dir}/taos.h ${inc_link_dir}/taosdef.h ${inc_link_dir}/taoserror.h ${inc_link_dir}/taosudf.h || : ${csudo}rm -f ${inc_link_dir}/taos.h ${inc_link_dir}/taosdef.h ${inc_link_dir}/taoserror.h ${inc_link_dir}/taosudf.h || :
[ -f ${inc_link_dir}/taosws.h ] && ${csudo}rm -f ${inc_link_dir}/taosws.h ||: [ -f ${inc_link_dir}/taosws.h ] && ${csudo}rm -f ${inc_link_dir}/taosws.h ||:
......
...@@ -388,8 +388,15 @@ char *taosDirEntryBaseName(char *name) { ...@@ -388,8 +388,15 @@ char *taosDirEntryBaseName(char *name) {
_splitpath(name, NULL, NULL, Filename1, Ext1); _splitpath(name, NULL, NULL, Filename1, Ext1);
return name + (strlen(name) - strlen(Filename1) - strlen(Ext1)); return name + (strlen(name) - strlen(Filename1) - strlen(Ext1));
#else #else
char *pPoint = strchr(name, '.'); if (name == NULL || (name[0] == '/' && name[1] == '\0')) return name;
if (pPoint != NULL) pPoint = 0; char *pPoint = strrchr(name, '/');
if (pPoint != NULL) {
if (*(pPoint + 1) == '\0') {
*pPoint = '\0';
return taosDirEntryBaseName(name);
}
return pPoint + 1;
}
return name; return name;
#endif #endif
} }
......
...@@ -17,7 +17,8 @@ IF (TD_WEBSOCKET) ...@@ -17,7 +17,8 @@ IF (TD_WEBSOCKET)
PATCH_COMMAND PATCH_COMMAND
COMMAND git clean -f -d COMMAND git clean -f -d
BUILD_COMMAND BUILD_COMMAND
COMMAND cargo build --release -p taos-ws-sys COMMAND cargo update
COMMAND cargo build --release -p taos-ws-sys --features native-tls-vendored
COMMAND ./taos-ws-sys/ci/package.sh COMMAND ./taos-ws-sys/ci/package.sh
INSTALL_COMMAND INSTALL_COMMAND
COMMAND cmake -E copy target/libtaosws/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib COMMAND cmake -E copy target/libtaosws/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib
...@@ -36,7 +37,8 @@ IF (TD_WEBSOCKET) ...@@ -36,7 +37,8 @@ IF (TD_WEBSOCKET)
PATCH_COMMAND PATCH_COMMAND
COMMAND git clean -f -d COMMAND git clean -f -d
BUILD_COMMAND BUILD_COMMAND
COMMAND cargo build --release -p taos-ws-sys COMMAND cargo update
COMMAND cargo build --release -p taos-ws-sys --features native-tls-vendored
COMMAND ./taos-ws-sys/ci/package.sh COMMAND ./taos-ws-sys/ci/package.sh
INSTALL_COMMAND INSTALL_COMMAND
COMMAND cmake -E copy target/libtaosws/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib COMMAND cmake -E copy target/libtaosws/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册