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

Unified Diff: runtime/bin/builtin.dart

Issue 10332257: Revert my last change. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 | « runtime/bin/builtin.cc ('k') | runtime/bin/dartutils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.dart
===================================================================
--- runtime/bin/builtin.dart (revision 7756)
+++ runtime/bin/builtin.dart (working copy)
@@ -23,6 +23,11 @@
}
+// Code to deal with URI resolution for the standalone binary.
+// For Windows we need to massage the paths a bit according to
+// http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx
+var _is_windows;
+
// The URI that the entrypoint script was loaded from. Remembered so that
// package imports can be resolved relative to it.
var _entrypoint;
@@ -43,13 +48,11 @@
_packageRoot = packageRoot;
}
-String _resolveScriptUri(String cwd, String scriptName, bool isWindows) {
+String _resolveScriptUri(String cwd, String scriptName, bool windows) {
+ _is_windows = windows;
_logResolution("# Current working directory: $cwd");
_logResolution("# ScriptName: $scriptName");
- if (isWindows) {
- // For Windows we need to massage the paths a bit according to
- // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx
- //
+ if (windows) {
// Convert
// C:\one\two\three
// to
@@ -89,7 +92,7 @@
}
-String _filePathFromUri(String userUri, bool isWindows) {
+String _filePathFromUri(String userUri) {
var uri = new Uri.fromString(userUri);
_logResolution("# Getting file path from: $uri");
@@ -110,10 +113,7 @@
throw "Not a known scheme: $uri";
}
- if (isWindows) {
- // For Windows we need to massage the paths a bit according to
- // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx
- //
+ if (_is_windows) {
// Drop the leading / before the drive letter.
path = path.substring(1);
_logResolution("# path: $path");
« no previous file with comments | « runtime/bin/builtin.cc ('k') | runtime/bin/dartutils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698