Chromium Code Reviews| Index: sdk/lib/io/platform_impl.dart |
| diff --git a/sdk/lib/io/platform_impl.dart b/sdk/lib/io/platform_impl.dart |
| index 0cffec6a532bd98f77549122771e11297bec48ff..e0d485bf3d47b70591daa6ccb8f8bec1496ec2d0 100644 |
| --- a/sdk/lib/io/platform_impl.dart |
| +++ b/sdk/lib/io/platform_impl.dart |
| @@ -62,14 +62,14 @@ class _Platform { |
| // environment variables that are used to record the current |
| // working directory for each drive and the exit code for the |
| // last command. As an example: '=A:=A:\subdir' records the |
| - // current working directory on the 'A' drive. In order to |
| - // handle these correctly we search for a second occurrence of |
| - // of '=' in the string if the first occurrence is at index 0. |
| + // current working directory on the 'A' drive. These environment |
| + // variables are ignored. |
| + // |
| + // On Mac OS an entry of just '=' has been seen. |
|
Lasse Reichstein Nielsen
2015/01/05 11:45:43
Add: Entries with no '=' should not happen. If it
Søren Gjesse
2015/01/05 12:32:14
Done.
|
| var equalsIndex = str.indexOf('='); |
| - if (equalsIndex == 0) { |
| - equalsIndex = str.indexOf('=', 1); |
| + if (equalsIndex == 0 || equalsIndex == -1) { |
|
Lasse Reichstein Nielsen
2015/01/05 11:45:43
equalsIndex <= 0
?
But switch the condition and a
Søren Gjesse
2015/01/05 12:32:14
Done.
|
| + continue; |
| } |
| - assert(equalsIndex != -1); |
| result[str.substring(0, equalsIndex)] = |
| str.substring(equalsIndex + 1); |
| } |