Only append trailing slash to ts rootdir if rootdir != "/"

This commit is contained in:
Panu Matilainen 2008-05-08 11:27:58 +03:00
parent 8a024c20e7
commit 42d0c3bd68
1 changed files with 3 additions and 1 deletions

View File

@ -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, "/");
}
}
}