From 0724b37e6ee6ae2a6fe5c803fbb6dc47434703ce Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 27 Oct 2007 23:04:35 +0000 Subject: [PATCH] Bug fixes with option -mv --- test/xorriso.c | 11 ++++++++--- test/xorriso_timestamp.h | 2 +- test/xorrisoburn.c | 8 ++++++-- test/xorrisoburn.h | 1 + 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/test/xorriso.c b/test/xorriso.c index 8733f5d6..f78bece7 100644 --- a/test/xorriso.c +++ b/test/xorriso.c @@ -3134,7 +3134,7 @@ int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv, if(ret<=0) return(ret); strcpy(target, eff_path); - ret= Xorriso_normalize_img_path(xorriso, source, eff_path, 2); + ret= Xorriso_normalize_img_path(xorriso, source, eff_path, 2|4); if(ret<=0) return(ret); strcpy(source, eff_path); @@ -3335,7 +3335,7 @@ int Xorriso_option_cdx(struct XorrisO *xorriso, char *disk_path, int flag) return(-1); } - ret= Xorriso_normalize_img_path(xorriso, path, eff_path, 2); + ret= Xorriso_normalize_img_path(xorriso, path, eff_path, 2|4); if(ret<=0) return(ret); if(eff_path[0]) { @@ -4115,7 +4115,7 @@ int Xorriso_option_mvi(struct XorrisO *xorriso, int argc, char **argv, /* Check existence of old addresses */ for(i= *idx; iinfo_text, 0, "SORRY", 0); {ret= 0; goto ex;} } + if(ret==0) { /* compute complete eff_dest */ + ret= Xorriso_normalize_img_path(xorriso, argv[end_idx-1], eff_dest, 2); + if(ret<0) + {ret= 0; goto ex;} + } /* Perform movements */ for(i= *idx; iwdi); + if(flag&4) + strcpy(path, xorriso->wdx); + else + strcpy(path, xorriso->wdi); ret= Sfile_add_to_path(path, img_path, 0); if(ret<=0) goto much_too_long; @@ -1433,7 +1437,7 @@ int Xorriso_rename(struct XorrisO *xorriso, return(ret); dest_dir= (struct iso_tree_node_dir *) iso_tree_volume_path_to_node(volume,dir_adr); - strcpy(dir_adr, eff_dest); + strcpy(dir_adr, origin); cpt= strrchr(dir_adr, '/'); if(cpt==NULL) cpt= dir_adr+strlen(dir_adr); diff --git a/test/xorrisoburn.h b/test/xorrisoburn.h index 724e7367..0ddc3526 100644 --- a/test/xorrisoburn.h +++ b/test/xorrisoburn.h @@ -62,6 +62,7 @@ int Xorriso_ls(struct XorrisO *xorriso, int flag); Must provide at least SfileadrL bytes of storage. @param flag bit0= do not produce problem events (unless faulty path format) bit1= work purely literally, do not use libisofs + bit2= (with bit1) this is an address in the disk world @return -1 = faulty path format, 0 = not found , 1 = found simple node , 2 = found directory */