aboutsummaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-10-05 11:18:05 +0100
committerRon Yorston <rmy@pobox.com>2012-10-05 11:18:05 +0100
commit239bba0059e5c8284c7f21e2b65b0467b20c6bd7 (patch)
treec19ff4fbe7ccfd2c453bfc291d6d375e54249edf /applets
parent01366408c9df773897bdd669cd4371d099f483bb (diff)
downloadbusybox-w32-239bba0059e5c8284c7f21e2b65b0467b20c6bd7.tar.gz
busybox-w32-239bba0059e5c8284c7f21e2b65b0467b20c6bd7.tar.bz2
busybox-w32-239bba0059e5c8284c7f21e2b65b0467b20c6bd7.zip
Revised quoting of command line arguments for WIN32
* We only need to quote an argument if it contains whitespace. * There's no point in quoting ? or * because Windows still expands them. Anyhow, if the command line comes from a BusyBox shell it will usually have handled the globbing, so we should turn off Windows globbing for any wildcard that has made it through the shell without expansion. This means that BusyBox commands run from cmd.exe won't do wildcard expansion, though. * Backslashes only need to be doubled if they occur immediately before double quotes. * Double quotes need to be escaped with a backslash.
Diffstat (limited to 'applets')
-rw-r--r--applets/applets.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/applets/applets.c b/applets/applets.c
index 98c2b44f5..7ffa7a896 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -9,6 +9,11 @@
9#include "busybox.h" 9#include "busybox.h"
10 10
11#if ENABLE_BUILD_LIBBUSYBOX 11#if ENABLE_BUILD_LIBBUSYBOX
12#if ENABLE_PLATFORM_MINGW32
13/* disable MSVCRT command line globbing */
14int _CRT_glob = 0;
15#endif
16
12int main(int argc UNUSED_PARAM, char **argv) 17int main(int argc UNUSED_PARAM, char **argv)
13{ 18{
14 return lbb_main(argv); 19 return lbb_main(argv);