Strip trailing /s in repo base URI.
Change-Id: I71040db2cca69638cfad89acdc9179ee80592b27 Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
This commit is contained in:
parent
289b7c60a9
commit
73d38bfb33
|
@ -149,7 +149,7 @@ private void resolveRelativeUris() {
|
||||||
!groupAUri.startsWith(prefix) ||
|
!groupAUri.startsWith(prefix) ||
|
||||||
!groupBUri.startsWith(prefix)) {
|
!groupBUri.startsWith(prefix)) {
|
||||||
start++;
|
start++;
|
||||||
rootUri = defaultUri.substring(0, start);
|
rootUri = defaultUri.substring(0, start) + "manifest";
|
||||||
defaultUri = defaultUri.substring(start);
|
defaultUri = defaultUri.substring(start);
|
||||||
notDefaultUri = notDefaultUri.substring(start);
|
notDefaultUri = notDefaultUri.substring(start);
|
||||||
groupAUri = groupAUri.substring(start);
|
groupAUri = groupAUri.substring(start);
|
||||||
|
|
|
@ -526,7 +526,7 @@ private void resolveRelativeUris() {
|
||||||
!groupAUri.startsWith(prefix) ||
|
!groupAUri.startsWith(prefix) ||
|
||||||
!groupBUri.startsWith(prefix)) {
|
!groupBUri.startsWith(prefix)) {
|
||||||
start++;
|
start++;
|
||||||
rootUri = defaultUri.substring(0, start);
|
rootUri = defaultUri.substring(0, start) + "manifest";
|
||||||
defaultUri = defaultUri.substring(start);
|
defaultUri = defaultUri.substring(start);
|
||||||
notDefaultUri = notDefaultUri.substring(start);
|
notDefaultUri = notDefaultUri.substring(start);
|
||||||
groupAUri = groupAUri.substring(start);
|
groupAUri = groupAUri.substring(start);
|
||||||
|
|
|
@ -289,7 +289,13 @@ private static class XmlManifest extends DefaultHandler {
|
||||||
this.command = command;
|
this.command = command;
|
||||||
this.inputStream = inputStream;
|
this.inputStream = inputStream;
|
||||||
this.filename = filename;
|
this.filename = filename;
|
||||||
this.baseUrl = baseUrl;
|
|
||||||
|
// Strip trailing /s to match repo behavior.
|
||||||
|
int lastIndex = baseUrl.length() - 1;
|
||||||
|
while (lastIndex >= 0 && baseUrl.charAt(lastIndex) == '/')
|
||||||
|
lastIndex--;
|
||||||
|
this.baseUrl = baseUrl.substring(0, lastIndex + 1);
|
||||||
|
|
||||||
remotes = new HashMap<String, String>();
|
remotes = new HashMap<String, String>();
|
||||||
projects = new ArrayList<Project>();
|
projects = new ArrayList<Project>();
|
||||||
plusGroups = new HashSet<String>();
|
plusGroups = new HashSet<String>();
|
||||||
|
|
Loading…
Reference in New Issue