Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: runtime/bin/path_impl.dart

Issue 10825434: Fix lowercasing output filenames for dart:3320 as well as fix for co19 test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added path length validation. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/filenames.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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('/', '\\');
« no previous file with comments | « lib/compiler/implementation/filenames.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698