=================================================================== RCS file: /home/wine/wine/programs/wcmd/Attic/builtins.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -p -r1.15 -r1.16 --- wine/programs/wcmd/Attic/builtins.c 2002/07/24 19:00:25 1.15 +++ wine/programs/wcmd/Attic/builtins.c 2003/01/15 03:35:32 1.16 @@ -389,25 +389,28 @@ char condition[MAX_PATH], *command, *s; if (!lstrcmpi (condition, "errorlevel")) { if (errorlevel >= atoi(WCMD_parameter (p, 1+negate, NULL))) test = 1; return; + WCMD_parameter (p, 2+negate, &command); } else if (!lstrcmpi (condition, "exist")) { - if ((h = CreateFile (WCMD_parameter (p, 1+negate, NULL), GENERIC_READ, 0, NULL, + if ((h = CreateFile (WCMD_parameter (p, 1+negate, NULL), GENERIC_READ, + FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) != INVALID_HANDLE_VALUE) { CloseHandle (h); test = 1; } + WCMD_parameter (p, 2+negate, &command); } else if ((s = strstr (p, "=="))) { s += 2; if (!lstrcmpi (condition, WCMD_parameter (s, 0, NULL))) test = 1; + WCMD_parameter (s, 1, &command); } else { WCMD_output ("Syntax error\n"); return; } if (test != negate) { - WCMD_parameter (p, 2+negate, &s); - command = strdup (s); + command = strdup (command); WCMD_process_command (command); free (command); }