1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

query_fileowner: don't append '/' if path is "/"

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Andrew Gregory 2012-08-28 21:59:25 -04:00 committed by Allan McRae
parent 49c5f515e9
commit 7a83cd003a

View File

@ -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);