Working towards exclusion of user defined absolute paths and leaf patterns

This commit is contained in:
2008-05-03 15:11:58 +00:00
parent 43d4c782d4
commit 1ad46882f4
4 changed files with 138 additions and 37 deletions

View File

@ -1639,7 +1639,7 @@ cannot_open_dir:;
}
/* compare exclusions against disk_path resp. name */
ret= Xorriso_path_is_excluded(xorriso, disk_path, 0);
ret= Xorriso_path_is_excluded(xorriso, disk_path, 0); /* (is never param) */
if(ret<0)
{ret= -1; goto ex;}
if(ret>0)
@ -1888,9 +1888,11 @@ int Xorriso_copy_properties(struct XorrisO *xorriso,
Set to NULL if calling this function from outside ISO world
@param flag bit0= mkdir: graft in as empty directory, not as copy from disk
bit1= do not report added files
bit2= -follow: this is not a command parameter
bit2= -follow, -not_*: this is not a command parameter
bit3= use offset and cut_size for cut_out_node
@return <=0 = error , 1 = added simple node , 2 = added directory
bit4= return 3 on rejection by exclusion or user
@return <=0 = error , 1 = added simple node , 2 = added directory ,
3 = rejected
*/
int Xorriso_graft_in(struct XorrisO *xorriso, void *boss_iter,
char *disk_path, char *img_path,
@ -1905,12 +1907,11 @@ int Xorriso_graft_in(struct XorrisO *xorriso, void *boss_iter,
int target_is_split;
struct stat stbuf;
/* compare exclusions against disk_path resp. name */
/* >>> ??? why not !(flag&4) ? : "but no leaf patter if flag&4 */;
ret= Xorriso_path_is_excluded(xorriso, disk_path, 0);
if(ret!=0)
ret= Xorriso_path_is_excluded(xorriso, disk_path, !(flag&4));
if(ret<0)
return(ret);
if(ret>0)
return(3*!!(flag&16));
for(cpt= img_path; 1; cpt++) {
cpt= strstr(cpt,"/.");
@ -2026,7 +2027,7 @@ int Xorriso_graft_in(struct XorrisO *xorriso, void *boss_iter,
sprintf(xorriso->info_text, "User revoked adding of: %s",
Text_shellsafe(disk_path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
return(0);
return(3*!!(flag&16));
}
node= NULL;
goto handle_path_node;