aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-03-29 12:39:30 +0100
committerRon Yorston <rmy@pobox.com>2020-03-29 12:39:30 +0100
commitbeff2721928fdb624c227cccd15bde7ae68862e3 (patch)
treeaab737745fbe04069fa7afd1d20bb779c8424237 /libbb/lineedit.c
parent4ddcb317ac954cc371a86d5873ee231c3b8684ec (diff)
downloadbusybox-w32-beff2721928fdb624c227cccd15bde7ae68862e3.tar.gz
busybox-w32-beff2721928fdb624c227cccd15bde7ae68862e3.tar.bz2
busybox-w32-beff2721928fdb624c227cccd15bde7ae68862e3.zip
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.
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c2
1 files changed, 1 insertions, 1 deletions
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)
863 /* path is of form c:path with no '/' */ 863 /* path is of form c:path with no '/' */
864 if (get_drive_cwd(command, buffer, PATH_MAX)) { 864 if (get_drive_cwd(command, buffer, PATH_MAX)) {
865 pfind = command + 2; 865 pfind = command + 2;
866 path1[0] = xstrdup(buffer); 866 path1[0] = dirbuf = xstrdup(buffer);
867 } 867 }
868 } else 868 } else
869#endif 869#endif