fix change scope

This commit is contained in:
facetosea 2023-10-12 10:56:03 +08:00
parent 35daa51878
commit 8d1e427861
1 changed files with 15 additions and 16 deletions

View File

@ -718,6 +718,7 @@ int taos_init() {
} }
int taos_options_imp(TSDB_OPTION option, const char *str) { int taos_options_imp(TSDB_OPTION option, const char *str) {
if (option == TSDB_OPTION_CONFIGDIR) {
#ifndef WINDOWS #ifndef WINDOWS
int len = strlen(str); int len = strlen(str);
if (len > 1 && str[0] != '"' && str[0] != '\'') { if (len > 1 && str[0] != '"' && str[0] != '\'') {
@ -733,8 +734,6 @@ int taos_options_imp(TSDB_OPTION option, const char *str) {
str = newstr; str = newstr;
} }
#endif #endif
if (option == TSDB_OPTION_CONFIGDIR) {
tstrncpy(configDir, str, PATH_MAX); tstrncpy(configDir, str, PATH_MAX);
tscInfo("set cfg:%s to %s", configDir, str); tscInfo("set cfg:%s to %s", configDir, str);
return 0; return 0;