Bug fix: -not_leaf and -not_paths were not applied to -extract and alike
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
|
||||
|
||||
Copyright 2007-2020 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
Copyright 2007-2021 Thomas Schmitt, <scdbackup@gmx.net>
|
||||
|
||||
Provided under GPL version 2 or later.
|
||||
|
||||
@@ -3126,28 +3126,43 @@ int Xorriso_pipe_open(struct XorrisO *xorriso, char *purpose, char *cmd,
|
||||
|
||||
|
||||
/* @param flag bit0= path is a command parameter
|
||||
bit1= prepend xorriso->wdx if path is relative
|
||||
bit2= do not issue note about excluded parameter
|
||||
*/
|
||||
int Xorriso_path_is_excluded(struct XorrisO *xorriso, char *path, int flag)
|
||||
{
|
||||
int ret;
|
||||
char *path_pt, *local_path_mem= NULL;
|
||||
|
||||
if(!(xorriso->disk_excl_mode&1)) /* exclusion is off */
|
||||
return(0);
|
||||
{ret= 0; goto ex;}
|
||||
if((flag&1) && !(xorriso->disk_excl_mode&2)) /* params are exempted */
|
||||
return(0);
|
||||
ret= Exclusions_match(xorriso->disk_exclusions, path,
|
||||
{ret= 0; goto ex;}
|
||||
|
||||
path_pt= path;
|
||||
if((flag & 2) && path[0] != '/' && path[0] != 0) {
|
||||
Xorriso_alloc_meM(local_path_mem, char,
|
||||
strlen(xorriso->wdx) + 1 + strlen(path) + 1);
|
||||
strcpy(local_path_mem, xorriso->wdx);
|
||||
strcat(local_path_mem, "/");
|
||||
strcat(local_path_mem, path);
|
||||
path_pt= local_path_mem;
|
||||
}
|
||||
ret= Exclusions_match(xorriso->disk_exclusions, path_pt,
|
||||
!!(xorriso->disk_excl_mode&4));
|
||||
if(ret<0) {
|
||||
sprintf(xorriso->info_text,
|
||||
"Error during disk file exclusion decision");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||
}
|
||||
if(ret>0 && (flag&1)) {
|
||||
if(ret > 0 && (flag & 1) && !(flag & 4)) {
|
||||
sprintf(xorriso->info_text, "Disk path parameter excluded by %s : ",
|
||||
(ret==1 ? "-not_paths" : "-not_leaf"));
|
||||
Text_shellsafe(path, xorriso->info_text, 1);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
}
|
||||
ex:;
|
||||
Xorriso_free_meM(local_path_mem);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user