New -find tests -has_filter, -has_no_filter
This commit is contained in:
@ -6663,9 +6663,11 @@ int Xorriso_findi_test(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
int depth, int flag)
|
||||
{
|
||||
int ret, start_lba, end_lba, damage_filter, commit_filter, lba, a_filter;
|
||||
int is_filtered= 0;
|
||||
off_t damage_start, damage_end, size;
|
||||
int lba_count, *file_end_lbas= NULL, *file_start_lbas= NULL, i;
|
||||
void *wanted_node;
|
||||
IsoStream *stream;
|
||||
|
||||
ret= Findjob_test(job, name, boss_stbuf, stbuf, depth, 1);
|
||||
if(ret<=0)
|
||||
@ -6749,6 +6751,20 @@ int Xorriso_findi_test(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
|
||||
Findjob_get_filter_filter(job, &a_filter, 0);
|
||||
if(a_filter) {
|
||||
is_filtered= 0;
|
||||
if(LIBISO_ISREG(node)) {
|
||||
stream= iso_file_get_stream((IsoFile *) node);
|
||||
if(iso_stream_get_input_stream(stream, 0) != NULL)
|
||||
is_filtered= 1;;
|
||||
}
|
||||
if(a_filter < 0 && is_filtered)
|
||||
{ret= 0; goto ex;}
|
||||
if(a_filter > 0 && !is_filtered)
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
|
||||
Findjob_get_wanted_node(job, &wanted_node, 0);
|
||||
if(wanted_node != NULL && ((IsoNode *) wanted_node) != node)
|
||||
{ret= 0; goto ex;}
|
||||
|
Reference in New Issue
Block a user