Some corrections of the previous commit

This commit is contained in:
Thomas Schmitt 2011-02-07 20:28:50 +00:00
parent 8a3e8b8771
commit 015c7e7046
6 changed files with 14 additions and 13 deletions

View File

@ -1189,15 +1189,15 @@ illegal_c:;
if(ret < 0) if(ret < 0)
{ret= -(ret != -1); goto ex;} {ret= -(ret != -1); goto ex;}
} else { } else {
ret= Xorriso_option_cdi(xorriso, "/", 0); strcpy(xorriso->wdi, "/");
if(ret <= 0)
goto ex;
} }
if(strcmp(old_root, xorriso->wdi) != 0) {
ret= Xorriso_clone_under(xorriso, old_root, xorriso->wdi, 0); ret= Xorriso_clone_under(xorriso, old_root, xorriso->wdi, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
} }
} }
}
xorriso->padding= 300*1024; xorriso->padding= 300*1024;

View File

@ -1381,9 +1381,9 @@ int Xorriso_rename(struct XorrisO *xorriso, void *boss_iter,
int Xorriso_cannot_clone(struct XorrisO *xorriso, char *eff_origin, int Xorriso_cannot_clone(struct XorrisO *xorriso, char *eff_origin,
char *eff_dest, int flag) char *eff_dest, int iso_error, int flag)
{ {
Xorriso_report_iso_error(xorriso, eff_dest, 0, "Cannot clone", Xorriso_report_iso_error(xorriso, eff_dest, iso_error, "Cannot clone",
0, "FAILURE", 1); 0, "FAILURE", 1);
sprintf(xorriso->info_text, "Failed to clone "); sprintf(xorriso->info_text, "Failed to clone ");
Text_shellsafe(eff_origin, xorriso->info_text, 1); Text_shellsafe(eff_origin, xorriso->info_text, 1);
@ -1467,7 +1467,7 @@ int Xorriso_clone_tree(struct XorrisO *xorriso, void *boss_iter,
ret = iso_tree_clone(origin_node, new_parent, leafname, &new_node, 0); ret = iso_tree_clone(origin_node, new_parent, leafname, &new_node, 0);
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
if(ret < 0) { if(ret < 0) {
Xorriso_cannot_clone(xorriso, eff_origin, eff_dest, 0); Xorriso_cannot_clone(xorriso, eff_origin, eff_dest, ret, 0);
return(0); return(0);
} }
Xorriso_set_change_pending(xorriso, 0); Xorriso_set_change_pending(xorriso, 0);
@ -1506,7 +1506,7 @@ int Xorriso_clone_under(struct XorrisO *xorriso, char *origin, char *dest,
while(iso_dir_iter_next(iter, &origin_node) == 1) { while(iso_dir_iter_next(iter, &origin_node) == 1) {
namept= (char *) iso_node_get_name(origin_node); namept= (char *) iso_node_get_name(origin_node);
sprintf(eff_origin, "%s/%s", origin, namept); sprintf(eff_origin, "%s/%s", origin, namept);
sprintf(eff_dest, "%s%s", dest, namept); sprintf(eff_dest, "%s/%s", dest, namept);
if(pass == 0) { if(pass == 0) {
ret= Xorriso_node_from_path(xorriso, volume, eff_dest, &new_node, 1); ret= Xorriso_node_from_path(xorriso, volume, eff_dest, &new_node, 1);
if(ret < 0) if(ret < 0)
@ -1521,7 +1521,7 @@ int Xorriso_clone_under(struct XorrisO *xorriso, char *origin, char *dest,
ret = iso_tree_clone(origin_node, dest_dir, namept, &new_node, 0); ret = iso_tree_clone(origin_node, dest_dir, namept, &new_node, 0);
Xorriso_process_msg_queues(xorriso,0); Xorriso_process_msg_queues(xorriso,0);
if(ret < 0) { if(ret < 0) {
Xorriso_cannot_clone(xorriso, eff_origin, eff_dest, 0); Xorriso_cannot_clone(xorriso, eff_origin, eff_dest, ret, 0);
ret= 0; goto ex; ret= 0; goto ex;
} }
} }
@ -1529,6 +1529,7 @@ int Xorriso_clone_under(struct XorrisO *xorriso, char *origin, char *dest,
iso_dir_iter_free(iter); iso_dir_iter_free(iter);
iter= NULL; iter= NULL;
} }
Xorriso_set_change_pending(xorriso, 0);
ret= 1; ret= 1;
ex:; ex:;
if(iter != NULL) if(iter != NULL)

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2010 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2010 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2010 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.02.07.184304" #define Xorriso_timestamP "2011.02.07.202851"