29 Aug
2012
29 Aug
'12
1:59 a.m.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> --- src/pacman/query.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pacman/query.c b/src/pacman/query.c index fc2c90c..92219e8 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -123,8 +123,10 @@ static int query_fileowner(alpm_list_t *targets) } /* append trailing '/' removed by realpath */ - path[rootlen++] = '/'; - path[rootlen] = '\0'; + if(path[rootlen - 1] != '/') { + path[rootlen++] = '/'; + path[rootlen] = '\0'; + } db_local = alpm_get_localdb(config->handle); -- 1.7.12