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:
parent
49c5f515e9
commit
7a83cd003a
1 changed files with 4 additions and 2 deletions
|
@ -123,8 +123,10 @@ static int query_fileowner(alpm_list_t *targets)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* append trailing '/' removed by realpath */
|
/* append trailing '/' removed by realpath */
|
||||||
path[rootlen++] = '/';
|
if(path[rootlen - 1] != '/') {
|
||||||
path[rootlen] = '\0';
|
path[rootlen++] = '/';
|
||||||
|
path[rootlen] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
db_local = alpm_get_localdb(config->handle);
|
db_local = alpm_get_localdb(config->handle);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue