Check access to file contents before adding it to public iso tree.
This commit is contained in:
parent
5c22069d19
commit
71cd3ccb89
@ -160,6 +160,12 @@ int iso_file_source_stream_new(IsoFileSource *src, IsoStream **stream)
|
|||||||
return ISO_FILE_IS_DIR;
|
return ISO_FILE_IS_DIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check for read access to contents */
|
||||||
|
r = iso_file_source_access(src);
|
||||||
|
if (r < 0) {
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
str = malloc(sizeof(IsoStream));
|
str = malloc(sizeof(IsoStream));
|
||||||
if (str == NULL) {
|
if (str == NULL) {
|
||||||
return ISO_MEM_ERROR;
|
return ISO_MEM_ERROR;
|
||||||
|
@ -462,8 +462,8 @@ int iso_add_dir_aux(IsoImage *image, IsoDir *parent, IsoFileSource *dir)
|
|||||||
result = builder->create_node(builder, image, file, &new);
|
result = builder->create_node(builder, image, file, &new);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
|
|
||||||
iso_msg_debug(image, "Error %d when adding file %s", result,
|
iso_msg_note(image, LIBISO_FILE_IGNORED, "Error %d when adding "
|
||||||
iso_file_source_get_path(file));
|
"file %s", result, iso_file_source_get_path(file));
|
||||||
|
|
||||||
if (image->recOpts->report) {
|
if (image->recOpts->report) {
|
||||||
action = image->recOpts->report(file, result, flag);
|
action = image->recOpts->report(file, result, flag);
|
||||||
|
Loading…
Reference in New Issue
Block a user