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

Unified Diff: lib/compiler/implementation/filenames.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 | « no previous file | runtime/bin/path_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/filenames.dart
diff --git a/lib/compiler/implementation/filenames.dart b/lib/compiler/implementation/filenames.dart
index ad086b3242eb636f6261cd3edbbf3a3fb37f5db1..d3f4e7b3ab3baff6a11d3562ffb73defee102b4f 100644
--- a/lib/compiler/implementation/filenames.dart
+++ b/lib/compiler/implementation/filenames.dart
@@ -14,23 +14,11 @@
// http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx
String nativeToUriPath(String filename) {
- if (Platform.operatingSystem != 'windows') return filename;
- filename = filename.toLowerCase();
- filename = filename.replaceAll('\\', '/');
- if (filename.length > 2 && filename[1] == ':') {
- filename = "/$filename";
- }
- return filename;
+ return new Path.fromNative(filename).toString();
}
String uriPathToNative(String path) {
- if (Platform.operatingSystem != 'windows') return path;
- path = path.toLowerCase();
- if (path.length > 3 && path[0] == '/' && path[2] == ':') {
- return path.substring(1).replaceAll('/', '\\');
- } else {
- return path.replaceAll('/', '\\');
- }
+ return new Path(path).toNativePath();
}
Uri getCurrentDirectory() {
« no previous file with comments | « no previous file | runtime/bin/path_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698