mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-08 12:28:00 -05:00
query_fileowner: break/continue pkgfile loop
Break out of pkgfile loop on match or continue if the pkgfile path is too long. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
This commit is contained in:
parent
0fe562011c
commit
bad00696f3
@ -212,12 +212,14 @@ static int query_fileowner(alpm_list_t *targets)
|
||||
if(strcmp(pkgfile, bname) == 0) {
|
||||
print_query_fileowner(filename, info);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if(rootlen + 1 + strlen(pkgfile) > PATH_MAX) {
|
||||
pm_printf(ALPM_LOG_ERROR, _("path too long: %s%s\n"), root, pkgfile);
|
||||
continue;
|
||||
}
|
||||
/* concatenate our file and the root path */
|
||||
strcpy(path + rootlen, pkgfile);
|
||||
@ -229,6 +231,8 @@ static int query_fileowner(alpm_list_t *targets)
|
||||
if(ppath && strcmp(ppath, rpath) == 0) {
|
||||
print_query_fileowner(filename, info);
|
||||
found = 1;
|
||||
free(ppath);
|
||||
break;
|
||||
}
|
||||
free(ppath);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user