From 13fc352af9a47da92ac0198c7a862c722f143508 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 8 Apr 2018 14:45:49 +0100 Subject: win32: more backslash to slash conversions Convert backslashes to slashes: - in the main program's argv[0] - in the shell's file argument Also, fix the code to remove the .exe extension from argv[0] in the main program. --- libbb/appletlib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 3e740363a..8fae11998 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -1150,7 +1150,8 @@ int main(int argc UNUSED_PARAM, char **argv) char *s; str_tolower(argv[0]); - if (has_exe_suffix_or_dot(argv[0]) && !(s=strrchr(argv[0], '.'))) { + convert_slashes(argv[0]); + if (has_exe_suffix_or_dot(argv[0]) && (s=strrchr(argv[0], '.'))) { *s = '\0'; } } -- cgit v1.2.3-55-g6feb