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

Unified Diff: sdk/lib/_internal/pub/lib/src/io.dart

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « sdk/lib/_internal/dartdoc/test/dartdoc_test.dart ('k') | sdk/lib/io/platform.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/io.dart
diff --git a/sdk/lib/_internal/pub/lib/src/io.dart b/sdk/lib/_internal/pub/lib/src/io.dart
index 40f09bf0b1c781846477cb09a7bf4bb2b0cf0efb..b4f6d919b01131f4e8f233ea2fa909963f73f649 100644
--- a/sdk/lib/_internal/pub/lib/src/io.dart
+++ b/sdk/lib/_internal/pub/lib/src/io.dart
@@ -381,7 +381,7 @@ void createPackageSymlink(String name, String target, String symlink,
/// Whether pub is running from within the Dart SDK, as opposed to from the Dart
/// source repository.
-bool get runningFromSdk => Platform.script.path.endsWith('.snapshot');
+bool get runningFromSdk => path.extension(Platform.script) == '.snapshot';
/// Resolves [target] relative to the path to pub's `resource` directory.
String resourcePath(String target) {
« no previous file with comments | « sdk/lib/_internal/dartdoc/test/dartdoc_test.dart ('k') | sdk/lib/io/platform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698