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

Unified Diff: lib/src/source/hosted.dart

Issue 1971523002: Fix --offline with prerelease versions. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 4 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 | « no previous file | test/hosted/offline_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/source/hosted.dart
diff --git a/lib/src/source/hosted.dart b/lib/src/source/hosted.dart
index e1cde6365633076f18ec3277d567c04fbb41c14c..6971e54a8310727efb5a503f81d8ce07b4154b2c 100644
--- a/lib/src/source/hosted.dart
+++ b/lib/src/source/hosted.dart
@@ -271,7 +271,7 @@ class OfflineHostedSource extends HostedSource {
var components = path.basename(entry).split("-");
if (components.first != ref.name) return null;
return HostedSource.idFor(
- ref.name, new Version.parse(components.last),
+ ref.name, new Version.parse(components.skip(1).join("-")),
url: _serverFor(ref.description));
}).where((id) => id != null).toList();
} else {
« no previous file with comments | « no previous file | test/hosted/offline_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698