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

Unified Diff: pkg/dev_compiler/lib/src/compiler/compiler.dart

Issue 2413823002: Fix file name handling on windows (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/compiler.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/compiler.dart b/pkg/dev_compiler/lib/src/compiler/compiler.dart
index e789bca3278c080ed1642d2fb992e9810afb8947..1e57ada7ac6d2c61058616381ee251ae593292bd 100644
--- a/pkg/dev_compiler/lib/src/compiler/compiler.dart
+++ b/pkg/dev_compiler/lib/src/compiler/compiler.dart
@@ -111,10 +111,10 @@ class ModuleCompiler {
var compilingSdk = false;
for (var sourcePath in unit.sources) {
var sourceUri = Uri.parse(sourcePath);
- if (sourceUri.scheme == '') {
- sourceUri = path.toUri(path.absolute(sourcePath));
- } else if (sourceUri.scheme == 'dart') {
+ if (sourceUri.scheme == 'dart') {
compilingSdk = true;
+ } else if (sourceUri.scheme != 'package') {
+ sourceUri = path.toUri(path.absolute(sourcePath));
}
Source source = context.sourceFactory.forUri2(sourceUri);
@@ -503,7 +503,7 @@ Map placeSourceMap(
if (match != null) return match;
// Fall back to a relative path.
- return path.toUri(path.relative(path.fromUri(uri), from: dir)).toString();
+ return path.toUri(path.relative(uri, from: dir)).toString();
}
for (int i = 0; i < list.length; i++) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698