New option -cp_clone

This commit is contained in:
2011-02-04 19:19:24 +00:00
parent ad30951fa5
commit 85732c1859
11 changed files with 232 additions and 61 deletions

View File

@@ -916,6 +916,7 @@ unsupported_type:;
/* @param flag bit0= do not produce info message on success
bit1= do not raise protest if directory already exists
@return 1=success,
0=was already directory, -1=was other type, -2=other error
*/
@@ -928,8 +929,10 @@ int Xorriso_mkdir(struct XorrisO *xorriso, char *path, int flag)
if(ret<0)
return(-2);
if(ret>0) {
if(ret == 2 && (flag & 2))
return(0);
sprintf(xorriso->info_text,"-mkdir: Address already existing %s",
Text_shellsafe(eff_path, sfe, 0));
Text_shellsafe(eff_path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0,
(ret==2 ? "WARNING" : "FAILURE"), 0);
return(-1+(ret==2));
@@ -1405,7 +1408,7 @@ int Xorriso_clone_tree(struct XorrisO *xorriso, void *boss_iter,
if(eff_dest[0] == 0)
strcpy(eff_dest, "/");
sprintf(xorriso->info_text,
"Cloning: Copy address already exists : ");
"Cloning: Copy address already exists: ");
Text_shellsafe(eff_dest, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);