Chromium Code Reviews

Unified Diff: runtime/bin/process_patch.dart

Issue 17447015: Always escape " in Process on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_patch.dart
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index ba50c9f5a0e67730efd96c42b63bdc4668a311a1..b30f449c7d014efa3d7965d73ad03cab902fb67e 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -92,8 +92,7 @@ class _ProcessImpl extends NativeFieldWrapperClass1 implements Process {
}
_arguments[i] = arguments[i];
if (Platform.operatingSystem == 'windows') {
- _arguments[i] = _windowsArgumentEscape(_arguments[i],
- shellEscape: runInShell);
+ _arguments[i] = _windowsArgumentEscape(_arguments[i]);
}
}
@@ -158,12 +157,11 @@ class _ProcessImpl extends NativeFieldWrapperClass1 implements Process {
return shellArguments;
}
- String _windowsArgumentEscape(String argument, { bool shellEscape: false }) {
+ String _windowsArgumentEscape(String argument) {
var result = argument;
if (argument.contains('\t') ||
argument.contains(' ') ||
- // TODO(ajohnsen): Remove shellEscape.
- (shellEscape && argument.contains('"'))) {
+ argument.contains('"')) {
// Produce something that the C runtime on Windows will parse
// back as this string.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine