diff options
author | Ron Yorston <rmy@pobox.com> | 2017-07-31 13:18:29 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-07-31 13:18:29 +0100 |
commit | b0d1b94b6fffc2d472bc4a6f0c70104b6b16f097 (patch) | |
tree | 5966803c5b5db08e448beb8aaaca293330b27480 | |
parent | d4efd67ff83c8c4dffc138531995bb9177f7c7d4 (diff) | |
download | busybox-w32-b0d1b94b6fffc2d472bc4a6f0c70104b6b16f097.tar.gz busybox-w32-b0d1b94b6fffc2d472bc4a6f0c70104b6b16f097.tar.bz2 busybox-w32-b0d1b94b6fffc2d472bc4a6f0c70104b6b16f097.zip |
win32: check for relative path when spawning process
When spawning a process the file should be executed directly if its
filename contains any path separator, not just if it's an absolute
path.
-rw-r--r-- | win32/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/process.c b/win32/process.c index 4190c78f8..968ea9afd 100644 --- a/win32/process.c +++ b/win32/process.c | |||
@@ -301,7 +301,7 @@ mingw_spawn_1(int mode, const char *cmd, const char *const *argv, const char *co | |||
301 | return mingw_spawn_applet(mode, argv, envp); | 301 | return mingw_spawn_applet(mode, argv, envp); |
302 | else | 302 | else |
303 | #endif | 303 | #endif |
304 | if (is_absolute_path(cmd)) | 304 | if (strchr(cmd, '/') || strchr(cmd, '\\')) |
305 | return mingw_spawn_interpreter(mode, cmd, argv, envp); | 305 | return mingw_spawn_interpreter(mode, cmd, argv, envp); |
306 | else { | 306 | else { |
307 | char *tmp, *path = getenv("PATH"); | 307 | char *tmp, *path = getenv("PATH"); |