runnerw handles spaces in command line cidr/96.690 idea/96.687 pycharm/96.683 pycharm/96.688 rubymine/96.689
authorDmitry Jemerov <yole@jetbrains.com>
Sun, 18 Jul 2010 11:25:50 +0000 (15:25 +0400)
committerDmitry Jemerov <yole@jetbrains.com>
Sun, 18 Jul 2010 11:25:50 +0000 (15:25 +0400)
native/runner/runnerw/runnerw.cpp

index d29b27f217f78ed707385d73e33b09f0253b0adc..098f1ab9f5f3938410c8fe1ed3d268e80b8e56ea 100644 (file)
@@ -119,7 +119,16 @@ int main(int argc, char * argv[]) {
 
        for (int i = 2; i < argc; i++) {
                args += " ";
 
        for (int i = 2; i < argc; i++) {
                args += " ";
-               args += argv[i];
+               if (strchr(argv [i], ' '))
+               {
+                       args += "\"";
+                       args += argv[i];
+                       args += "\"";
+               }
+               else 
+               {
+                       args += argv[i];
+               }
        }
 
        if (app.length() == 0) {
        }
 
        if (app.length() == 0) {