未验证 提交 697ff6ae 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

[TD-6274]<fix>: taos shell --file bug. (#7570)

上级 ceeb22d6
...@@ -108,7 +108,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) { ...@@ -108,7 +108,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
arguments->is_raw_time = true; arguments->is_raw_time = true;
break; break;
case 'f': case 'f':
if (wordexp(arg, &full_path, 0) != 0) { if ((0 == strlen(arg)) || (wordexp(arg, &full_path, 0) != 0)) {
fprintf(stderr, "Invalid path %s\n", arg); fprintf(stderr, "Invalid path %s\n", arg);
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册