Chromium Code Reviews| Index: runtime/bin/builtin.dart |
| diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart |
| index c20f7d1726c5afb990ceb024f3c7b3463d86d8f1..583533981942f28d3dd9be66118b2f8a4911a1d8 100644 |
| --- a/runtime/bin/builtin.dart |
| +++ b/runtime/bin/builtin.dart |
| @@ -215,7 +215,7 @@ void _setWorkingDirectory(cwd) { |
| _workingWindowsDrivePrefix = _extractDriveLetterPrefix(cwd); |
| cwd = _sanitizeWindowsPath(cwd); |
| cwd = _enforceTrailingSlash(cwd); |
|
Lasse Reichstein Nielsen
2014/06/13 11:53:04
Are these sanitizations still necessary when using
Anders Johnsen
2014/06/13 12:41:38
Please try without.
Søren Gjesse
2014/06/13 15:25:04
I think it is - if this is used with .resolve then
|
| - _workingDirectoryUri = new Uri(scheme: 'file', path: cwd); |
| + _workingDirectoryUri = new Uri.file(cwd); |
| _logResolution('# Working Directory: $cwd'); |
| } |
| @@ -238,8 +238,15 @@ String _resolveScriptUri(String scriptName) { |
| throw 'No current working directory set.'; |
| } |
| scriptName = _sanitizeWindowsPath(scriptName); |
| - |
| - var scriptUri = Uri.parse(scriptName); |
| + var scriptUri; |
| + if (scriptName.startsWith("file:") || |
| + scriptName.startsWith("http:") || |
| + scriptName.startsWith("https:")) { |
| + scriptUri = Uri.parse(scriptName); |
| + } else { |
| + // Assume it's a file name. |
| + scriptUri = new Uri.file(scriptName); |
| + } |
| if (scriptUri.scheme != '') { |
| // Script has a scheme, assume that it is fully formed. |
| _entryPointScript = scriptUri; |