This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 178201
Collapse All | Expand All

(-)a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/api/DefaultProjectActionHandler.java (-1 / +12 lines)
Lines 174-180 Link Here
174
                                !exe.endsWith(".exe")) { // NOI18N
174
                                !exe.endsWith(".exe")) { // NOI18N
175
                            exe = exe + ".exe"; // NOI18N
175
                            exe = exe + ".exe"; // NOI18N
176
                        }
176
                        }
177
                        args = MessageFormat.format(pae.getProfile().getTerminalOptions(), rcfile, exe, args, args2);
177
                        // fixing #178201 Run fails if 'Show profiling indicators' is off and the project is created in folder with space
178
                        StringBuilder b = new StringBuilder();
179
                        for (int i = 0; i < exe.length(); i++) {
180
                            if (exe.charAt(i) == '"') {
181
                                b.append("\\\""); // NOI18N
182
                            } else {
183
                                b.append(exe.charAt(i));
184
                            }
185
                        }
186
                        String exe2 = b.toString();
187
188
                        args = MessageFormat.format(pae.getProfile().getTerminalOptions(), rcfile, exe, args, args2, exe2);
178
                        exe = pae.getProfile().getTerminalPath();
189
                        exe = pae.getProfile().getTerminalPath();
179
                    }
190
                    }
180
                }
191
                }
(-)a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/api/runprofiles/RunProfile.java (-1 / +8 lines)
Lines 199-204 Link Here
199
        String name;
199
        String name;
200
        String termPath;
200
        String termPath;
201
201
202
        // Format string arguments:
203
        // 0 - file to store return code
204
        // 1 - executable name (quated if need, i.e. if it contains spaces, asterisks, etc.)
205
        // 2 - args (quated if need, i.e. if it contains spaces, asterisks, etc.)
206
        // 3 - the same as {3}, but quotes are escaped with '\'
207
        // 4 - (added by VK: the same as {1}, but quotes are escaped with '\'
208
        // fixing #178201 Run fails if 'Show profiling indicators' is off and the project is created in folder with space
202
        list.add(def);
209
        list.add(def);
203
        if (isWindows()) {
210
        if (isWindows()) {
204
            String term = getString("TerminalType_CommandWindow"); // NOI18N
211
            String term = getString("TerminalType_CommandWindow"); // NOI18N
Lines 220-226 Link Here
220
                list.add(name);
227
                list.add(name);
221
                termPaths.put(name, termPath);
228
                termPaths.put(name, termPath);
222
                termPaths.put(def, termPath);
229
                termPaths.put(def, termPath);
223
                String opts = "--disable-factory --hide-menubar " + "--title=\"{1} {3}\" " + // NOI18N
230
                String opts = "--disable-factory --hide-menubar " + "--title=\"{4} {3}\" " + // NOI18N
224
                        "-x \"" + dorun + "\" -p \"" + getString("LBL_RunPrompt") + "\" " + // NOI18N
231
                        "-x \"" + dorun + "\" -p \"" + getString("LBL_RunPrompt") + "\" " + // NOI18N
225
                        "-f \"{0}\" {1} {2}"; // NOI18N
232
                        "-f \"{0}\" {1} {2}"; // NOI18N
226
                termOptions.put(name, opts);
233
                termOptions.put(name, opts);

Return to bug 178201