mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04: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);
|
archive_read_data_skip(archive);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} 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 */
|
/* build the new entryname relative to handle->root */
|
||||||
snprintf(filename, PATH_MAX, "%s%s", handle->root, entryname);
|
snprintf(filename, PATH_MAX, "%s%s", handle->root, entryname);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user