libxbps: strip redundant dir separators returned by xbps_pkg_index_plist().
This commit is contained in:
parent
ced906ff3f
commit
45d55698d8
14
lib/util.c
14
lib/util.c
@ -211,15 +211,15 @@ get_pkg_index_remote_plist(const char *uri)
|
|||||||
if (uri_fixed == NULL)
|
if (uri_fixed == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
repodir = xbps_xasprintf("%s/%s/%s/%s",
|
if (prop_string_equals_cstring(xhp->rootdir, "/")) {
|
||||||
prop_string_cstring_nocopy(xhp->rootdir),
|
repodir = xbps_xasprintf("%s/%s/%s",
|
||||||
XBPS_META_PATH, uri_fixed, XBPS_PKGINDEX);
|
XBPS_META_PATH, uri_fixed, XBPS_PKGINDEX);
|
||||||
if (repodir == NULL) {
|
} else {
|
||||||
free(uri_fixed);
|
repodir = xbps_xasprintf("%s/%s/%s",
|
||||||
return NULL;
|
prop_string_cstring_nocopy(xhp->rootdir),
|
||||||
|
XBPS_META_PATH, uri_fixed, XBPS_PKGINDEX);
|
||||||
}
|
}
|
||||||
free(uri_fixed);
|
free(uri_fixed);
|
||||||
|
|
||||||
return repodir;
|
return repodir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user