New -find actions update_merge, rm_merge, clear_merge. -cp_clone now merges.

This commit is contained in:
2011-02-12 17:14:23 +00:00
parent 2c37215969
commit 7f01cfd5dc
18 changed files with 435 additions and 116 deletions

View File

@ -1953,14 +1953,20 @@ nondir_exists:;
}
ret= Xorriso_iso_lstat(xorriso, eff_dest, &stbuf, 0);
if(pass == 0) {
/* It is ok if both are directories */;
if(ret >= 0 && S_ISDIR(stbuf.st_mode)) {
ret= Xorriso_iso_lstat(xorriso, eff_origin, &stbuf, 0);
if (ret >= 0 && S_ISDIR(stbuf.st_mode))
ret= -1;
}
if(ret >= 0) {
sprintf(xorriso->info_text, "Cloning: Copy address already exists: ");
sprintf(xorriso->info_text, "Cloning: May not overwrite: ");
Text_shellsafe(eff_dest, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
goto problem_handler;
}
} else if(ret == -1) {
ret= Xorriso_clone_tree(xorriso, NULL, eff_origin, eff_dest, 0);
} else {
ret= Xorriso_clone_tree(xorriso, NULL, eff_origin, eff_dest, 1);
if(ret <= 0)
goto problem_handler;
sprintf(xorriso->info_text, "Cloned in ISO image: ");