From 584d06bd2733f926f64ece56fc76cff4bfbc0ad5 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Wed, 29 Jun 2022 23:18:14 -0400 Subject: [finsh]修复使用finsh_set_prompt重定向了msh提示符的名称后,路径功能没有的问题 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/finsh/shell.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/finsh/shell.c b/components/finsh/shell.c index c06b688ed3..fecb4f4af3 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -101,9 +101,11 @@ const char *finsh_get_prompt(void) if (finsh_prompt_custom) { strncpy(finsh_prompt, finsh_prompt_custom, sizeof(finsh_prompt) - 1); - return finsh_prompt; } - strcpy(finsh_prompt, _MSH_PROMPT); + else + { + strcpy(finsh_prompt, _MSH_PROMPT); + } #if defined(DFS_USING_POSIX) && defined(DFS_USING_WORKDIR) /* get current working directory */ -- cgit v1.3.1