aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-04-08 14:45:49 +0100
committerRon Yorston <rmy@pobox.com>2018-04-08 14:52:20 +0100
commit13fc352af9a47da92ac0198c7a862c722f143508 (patch)
treed4fb8ce34171ca0c3d3c8229dbb561238e1a8fa2 /libbb
parentdbac0d1b489703d4a35571c3f231da8a95a5c12a (diff)
downloadbusybox-w32-13fc352af9a47da92ac0198c7a862c722f143508.tar.gz
busybox-w32-13fc352af9a47da92ac0198c7a862c722f143508.tar.bz2
busybox-w32-13fc352af9a47da92ac0198c7a862c722f143508.zip
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.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/appletlib.c3
1 files changed, 2 insertions, 1 deletions
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)
1150 char *s; 1150 char *s;
1151 1151
1152 str_tolower(argv[0]); 1152 str_tolower(argv[0]);
1153 if (has_exe_suffix_or_dot(argv[0]) && !(s=strrchr(argv[0], '.'))) { 1153 convert_slashes(argv[0]);
1154 if (has_exe_suffix_or_dot(argv[0]) && (s=strrchr(argv[0], '.'))) {
1154 *s = '\0'; 1155 *s = '\0';
1155 } 1156 }
1156 } 1157 }