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
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue