Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/source_file_provider.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart |
| index 4157fc9e45175efcba141395e9aa0afd88c51f39..609cf1c2230dc9ccec01ab4eb23257e6911dbb4b 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart |
| @@ -27,7 +27,6 @@ String readAll(String filename) { |
| class SourceFileProvider { |
| bool isWindows = (Platform.operatingSystem == 'windows'); |
| - Uri cwd = getCurrentDirectory(); |
|
ahe
2013/04/09 08:28:44
I think it makes sense to keep the local variable.
Johnni Winther
2013/04/22 13:00:02
Done.
|
| Map<String, SourceFile> sourceFiles = <String, SourceFile>{}; |
| int dartCharactersRead = 0; |
| @@ -39,12 +38,13 @@ class SourceFileProvider { |
| try { |
| source = readAll(uriPathToNative(resourceUri.path)); |
| } on FileIOException catch (ex) { |
| - throw 'Error: Cannot read "${relativize(cwd, resourceUri, isWindows)}" ' |
| + throw 'Error: Cannot read ' |
| + '"${relativize(currentDirectory, resourceUri, isWindows)}" ' |
| '(${ex.osError}).'; |
| } |
| dartCharactersRead += source.length; |
| - sourceFiles[resourceUri.toString()] = |
| - new SourceFile(relativize(cwd, resourceUri, isWindows), source); |
| + sourceFiles[resourceUri.toString()] = new SourceFile( |
| + relativize(currentDirectory, resourceUri, isWindows), source); |
| return new Future.immediate(source); |
| } |
| } |