Index: runtime/bin/path_impl.dart |
diff --git a/runtime/bin/path_impl.dart b/runtime/bin/path_impl.dart |
index 40b6aa7e095ececc5943a87dd5c7e11c1f6eb198..1ab66480a630ade9469227667810029ed91e8e1b 100644 |
--- a/runtime/bin/path_impl.dart |
+++ b/runtime/bin/path_impl.dart |
@@ -164,7 +164,9 @@ class _Path implements Path { |
if (Platform.operatingSystem == 'windows') { |
String nativePath = _path; |
// Drop '/' before a drive letter. |
- if (nativePath.startsWith('/') && nativePath[2] == ':') { |
+ if (nativePath.length > 3 && |
+ nativePath.startsWith('/') && |
+ nativePath[2] == ':') { |
nativePath = nativePath.substring(1); |
} |
nativePath = nativePath.replaceAll('/', '\\'); |