From beff2721928fdb624c227cccd15bde7ae68862e3 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 29 Mar 2020 12:39:30 +0100 Subject: win32: more improvements to 'c:file' paths Tab-completion of 'c:file' paths was leaking memory and incorrectly included BusyBox applets and shell built-ins. Fix handling of 'c:file' paths used as arguments to spawn functions. Otherwise things like 'timeout 5 c:busybox sleep 99' don't work. --- libbb/lineedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbb/lineedit.c') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 14eb16873..f4247d237 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -863,7 +863,7 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type) /* path is of form c:path with no '/' */ if (get_drive_cwd(command, buffer, PATH_MAX)) { pfind = command + 2; - path1[0] = xstrdup(buffer); + path1[0] = dirbuf = xstrdup(buffer); } } else #endif -- cgit v1.2.3-55-g6feb