remove.c: check that required objs are in files.plist.
--HG-- extra : convert_revision : a4e15ac3f48bf496d8671997b8e875c750b42730
This commit is contained in:
parent
0d8f08e8ea
commit
4c70b24941
1 changed files with 6 additions and 3 deletions
|
@ -118,15 +118,18 @@ remove_pkg_files(prop_object_t obj, void *arg, bool *loop_done)
|
||||||
|
|
||||||
(void)loop_done;
|
(void)loop_done;
|
||||||
|
|
||||||
prop_dictionary_get_cstring_nocopy(obj, "file", &file);
|
if (!prop_dictionary_get_cstring_nocopy(obj, "file", &file))
|
||||||
if (file == NULL)
|
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
path = xbps_append_full_path(false, rmcb->destdir, file);
|
path = xbps_append_full_path(false, rmcb->destdir, file);
|
||||||
if (path == NULL)
|
if (path == NULL)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
prop_dictionary_get_cstring_nocopy(obj, "type", &type);
|
if (!prop_dictionary_get_cstring_nocopy(obj, "type", &type)) {
|
||||||
|
free(path);
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(type, "file") == 0) {
|
if (strcmp(type, "file") == 0) {
|
||||||
prop_dictionary_get_cstring_nocopy(obj, "sha256", &sha256);
|
prop_dictionary_get_cstring_nocopy(obj, "sha256", &sha256);
|
||||||
rv = xbps_check_file_hash(path, sha256);
|
rv = xbps_check_file_hash(path, sha256);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue