From 697ff6aee2ab2f91cd54b5413d4f4546746c245b Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 25 Aug 2021 12:23:21 +0800 Subject: [PATCH] [TD-6274]: taos shell --file bug. (#7570) --- src/kit/shell/src/shellLinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kit/shell/src/shellLinux.c b/src/kit/shell/src/shellLinux.c index f1c578015d..93783b2055 100644 --- a/src/kit/shell/src/shellLinux.c +++ b/src/kit/shell/src/shellLinux.c @@ -108,7 +108,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) { arguments->is_raw_time = true; break; 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); return -1; } -- GitLab