From: Michael Schroeder Date: Fri, 3 Mar 2017 15:48:40 +0000 (+0100) Subject: Make dir2str return "/" if did == 1 and suf == NULL X-Git-Tag: 0.6.27~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ceec3e42782400ed3ddf87c541d6495b1238141a;p=thirdparty%2Flibsolv.git Make dir2str return "/" if did == 1 and suf == NULL It used to return "", which is wrong. did == 1 is somewhat of a special case. --- diff --git a/src/repodata.c b/src/repodata.c index 027c24c3..06b2ea3e 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -351,6 +351,8 @@ repodata_dir2str(Repodata *data, Id did, const char *suf) if (!did) return suf ? suf : ""; + if (did == 1 && !suf) + return "/"; parent = did; while (parent) {