cmd: Add support for 'if /i'.
authorTrey Hunner <treyhunner@gmail.com>
Tue, 2 Feb 2010 09:09:06 +0000 (01:09 -0800)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 2 Feb 2010 10:59:33 +0000 (11:59 +0100)
programs/cmd/builtins.c

index 2c2761d8da1ad31e203deb77d72d2083963ae751..c63360bf23026f3a133b8b6695095c68bb083212 100644 (file)
@@ -1277,6 +1277,7 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList) {
   static const WCHAR existW[]  = {'e','x','i','s','t','\0'};
   static const WCHAR defdW[]   = {'d','e','f','i','n','e','d','\0'};
   static const WCHAR eqeqW[]   = {'=','=','\0'};
+  static const WCHAR parmI[]   = {'/','I','\0'};
 
   if (!lstrcmpiW (param1, notW)) {
     negate = 1;
@@ -1305,7 +1306,12 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList) {
   }
   else if ((s = strstrW (p, eqeqW))) {
     s += 2;
-    if (!lstrcmpiW (condition, WCMD_parameter (s, 0, NULL))) test = 1;
+    if (strstrW (quals, parmI) == NULL) {
+        if (!lstrcmpW (condition, WCMD_parameter (s, 0, NULL))) test = 1;
+    }
+    else {
+        if (!lstrcmpiW (condition, WCMD_parameter (s, 0, NULL))) test = 1;
+    }
     WCMD_parameter (s, 1, &command);
   }
   else {