Bug fix: -findi operated on nodes which ceased existence shortly before

This commit is contained in:
2008-05-18 08:21:48 +00:00
parent ddf698c1c4
commit de589419da
3 changed files with 51 additions and 15 deletions

View File

@ -7246,7 +7246,7 @@ ex:;
/* @param boss_iter Opaque handle to be forwarded to actions in ISO image
Set to NULL if calling this function from outside ISO world
@param flag bit2= -follow: this is not a command parameter
@return <=0 error, 1= ok , 2= iso_rr_path has been deleted ,
@return <=0 error, 1= ok , 2= iso_rr_path node object has been deleted ,
3= no action taken
*/
int Xorriso_update_interpreter(struct XorrisO *xorriso, void *boss_iter,
@ -7337,6 +7337,7 @@ delete:;
ret= Xorriso_rmi(xorriso, NULL, (off_t) 0, part_path, 1);
if(ret<=0)
goto ex;
deleted= 1;
} else {
partno= i+1;
offset= i*first_bytes;
@ -7359,9 +7360,12 @@ delete:;
ret= Xorriso_copy_properties(xorriso, disk_path, iso_rr_path, 2);
if(ret<=0)
goto ex;
} else
} else {
ret= Xorriso_graft_in(xorriso, boss_iter, disk_path, iso_rr_path,
(off_t) 0, (off_t) 0, 2|(flag&4));
if(ret>0 && !(compare_result&2))
deleted= 1;
}
sprintf(xorriso->info_text, "Added/overwrote ");
} else if(compare_result&(4|16|32|256|512|1024)) {
@ -8214,10 +8218,10 @@ int Xorriso_option_compare(struct XorrisO *xorriso, char *disk_path,
if(ipth[0]==0)
ipth= disk_path;
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, disk_path, eff_origin,
2|4);
2|4|8);
if(ret<=0)
return(ret);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, ipth, eff_dest, 2);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, ipth, eff_dest, 2|8);
if(ret<=0)
return(ret);
@ -10793,10 +10797,10 @@ int Xorriso_option_update(struct XorrisO *xorriso, char *disk_path,
if(ipth[0]==0)
ipth= disk_path;
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, disk_path, eff_origin,
2|4);
2|4|8);
if(ret<=0)
return(ret);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, ipth, eff_dest, 2);
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, ipth, eff_dest, 2|8);
if(ret<=0)
return(ret);