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

Side by Side Diff: runtime/bin/builtin.dart

Issue 335093002: Remove extra windows-char-sanitization, duplicationg and breaking the one in Uri.file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library builtin; 5 library builtin;
6 import 'dart:io'; 6 import 'dart:io';
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 // import 'root_library'; happens here from C Code 9 // import 'root_library'; happens here from C Code
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 206 }
207 if (cwd.length > 1 && cwd[1] == ':') { 207 if (cwd.length > 1 && cwd[1] == ':') {
208 return '/${cwd[0]}:'; 208 return '/${cwd[0]}:';
209 } 209 }
210 return null; 210 return null;
211 } 211 }
212 212
213 213
214 void _setWorkingDirectory(cwd) { 214 void _setWorkingDirectory(cwd) {
215 _workingWindowsDrivePrefix = _extractDriveLetterPrefix(cwd); 215 _workingWindowsDrivePrefix = _extractDriveLetterPrefix(cwd);
216 cwd = _sanitizeWindowsPath(cwd);
217 cwd = _enforceTrailingSlash(cwd);
218 _workingDirectoryUri = new Uri.file(cwd); 216 _workingDirectoryUri = new Uri.file(cwd);
219 if (!_workingDirectoryUri.path.endsWith("/")) { 217 if (!_workingDirectoryUri.path.endsWith("/")) {
220 var directoryPath = _workingDirectoryUri.path + "/"; 218 var directoryPath = _workingDirectoryUri.path + "/";
221 _workingDirectoryUri = _workingDirectoryUri.resolve(directoryPath); 219 _workingDirectoryUri = _workingDirectoryUri.resolve(directoryPath);
222 } 220 }
223 221
224 _logResolution('# Working Directory: $cwd'); 222 _logResolution('# Working Directory: $cwd');
225 } 223 }
226 224
227 225
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } else if (Platform.isWindows) { 452 } else if (Platform.isWindows) {
455 filename = '$name.dll'; 453 filename = '$name.dll';
456 } else { 454 } else {
457 _logResolution( 455 _logResolution(
458 'Native extensions not supported on ${Platform.operatingSystem}'); 456 'Native extensions not supported on ${Platform.operatingSystem}');
459 throw 'Native extensions not supported on ${Platform.operatingSystem}'; 457 throw 'Native extensions not supported on ${Platform.operatingSystem}';
460 } 458 }
461 459
462 return [path, filename, name]; 460 return [path, filename, name];
463 } 461 }
OLDNEW
« 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