From 9321cd1e2c29f6ffd8fe88ff5ab07f2500cce5ba Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Thu, 27 Feb 2003 14:40:31 +0000 Subject: [PATCH] Do not expand command lines automatically. This fixes 'objdir \??'. svn path=/trunk/; revision=4203 --- reactos/lib/msvcrt/misc/getargs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/lib/msvcrt/misc/getargs.c b/reactos/lib/msvcrt/misc/getargs.c index b48b72bdfcf..9ce3a2ca0e6 100644 --- a/reactos/lib/msvcrt/misc/getargs.c +++ b/reactos/lib/msvcrt/misc/getargs.c @@ -45,7 +45,7 @@ int add(char* name) return 0; } -int expand(char* name) +int expand(char* name, int flag) { char* s; WIN32_FIND_DATA fd; @@ -55,7 +55,7 @@ int expand(char* name) int pos; s = strpbrk(name, "*?"); - if (s) { + if (s && flag) { hFile = FindFirstFile(name, &fd); if (hFile != INVALID_HANDLE_VALUE) { while(s != name && *s != '/' && *s != '\\') @@ -98,7 +98,7 @@ int __getmainargs(int* argc, char*** argv, char*** env, int flag) while (_acmdln[i]) { if (_acmdln[i] == ' ') { - expand(strndup(_acmdln + afterlastspace, i - afterlastspace)); + expand(strndup(_acmdln + afterlastspace, i - afterlastspace), flag); i++; while (_acmdln[i]==' ') i++; @@ -109,7 +109,7 @@ int __getmainargs(int* argc, char*** argv, char*** env, int flag) } if (_acmdln[afterlastspace] != 0) { - expand(strndup(_acmdln+afterlastspace, i - afterlastspace)); + expand(strndup(_acmdln+afterlastspace, i - afterlastspace), flag); } HeapValidate(hHeap, 0, NULL); *argc = __argc;