mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-07 20:59:41 -05:00
Check if a file is in the package's file list before extracting
Signed-off-by: Florian Pritz <bluewind@xinu.at>
This commit is contained in:
parent
a7da2a47c3
commit
f27fad9b89
@ -178,6 +178,11 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive,
|
||||
archive_read_data_skip(archive);
|
||||
return 0;
|
||||
} else {
|
||||
if (!alpm_filelist_contains(&newpkg->files, entryname)) {
|
||||
_alpm_log(handle, ALPM_LOG_WARNING, _("file not found in file list for package %s. skipping extraction of %s\n"),
|
||||
newpkg->name, entryname);
|
||||
return 0;
|
||||
}
|
||||
/* build the new entryname relative to handle->root */
|
||||
snprintf(filename, PATH_MAX, "%s%s", handle->root, entryname);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user