mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-23 14:42:45 +08:00
fix(finsh): dup / cause error
if src == '/', result in something lik 'dest//file'
This commit is contained in:
@@ -274,6 +274,7 @@ static int cmd_mv(int argc, char **argv)
|
||||
if (*src == '/') break;
|
||||
src --;
|
||||
}
|
||||
if(*src == '/') src++;
|
||||
|
||||
rt_snprintf(dest, DFS_PATH_MAX - 1, "%s/%s", argv[2], src);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user