From 42d0c3bd685ddbc093c3e9c8449c4cb015923f25 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 8 May 2008 11:27:58 +0300 Subject: Only append trailing slash to ts rootdir if rootdir != "/" --- lib/rpmts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rpmts.c b/lib/rpmts.c index 225cdcfae..26ccca829 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -967,7 +967,9 @@ void rpmtsSetRootDir(rpmts ts, const char * rootDir) /* Ensure clean path with a trailing slash */ ts->rootDir = rpmGetPath(rootDir, NULL); - rstrcat(&ts->rootDir, "/"); + if (strcmp(ts->rootDir, "/") != 0) { + rstrcat(&ts->rootDir, "/"); + } } } -- cgit v1.2.3