fix test failed
This commit is contained in:
parent
8d1e427861
commit
81dc3e7ea2
|
@ -720,13 +720,13 @@ int taos_init() {
|
|||
int taos_options_imp(TSDB_OPTION option, const char *str) {
|
||||
if (option == TSDB_OPTION_CONFIGDIR) {
|
||||
#ifndef WINDOWS
|
||||
char newstr[PATH_MAX];
|
||||
int len = strlen(str);
|
||||
if (len > 1 && str[0] != '"' && str[0] != '\'') {
|
||||
if (len + 2 >= PATH_MAX) {
|
||||
tscError("Too long path %s", str);
|
||||
return -1;
|
||||
}
|
||||
char newstr[PATH_MAX];
|
||||
newstr[0] = '"';
|
||||
strncpy(newstr+1, str, len);
|
||||
newstr[len + 1] = '"';
|
||||
|
|
Loading…
Reference in New Issue