summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
Diffstat (limited to 'rpmdb')
-rw-r--r--rpmdb/rpmdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c
index c15253e21..e88c92eef 100644
--- a/rpmdb/rpmdb.c
+++ b/rpmdb/rpmdb.c
@@ -3773,7 +3773,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
}
dbpath = rootdbpath = rpmGetPath(prefix, tfn, NULL);
if (!(prefix[0] == '/' && prefix[1] == '\0'))
- dbpath += strlen(prefix);
+ dbpath += strlen(prefix) - 1;
tfn = _free(tfn);
/*@-nullpass@*/
@@ -3796,7 +3796,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
}
newdbpath = newrootdbpath = rpmGetPath(prefix, tfn, NULL);
if (!(prefix[0] == '/' && prefix[1] == '\0'))
- newdbpath += strlen(prefix);
+ newdbpath += strlen(prefix) - 1;
tfn = _free(tfn);
rpmMessage(RPMMESS_DEBUG, _("rebuilding database %s into %s\n"),