From b1b4bba42a4e0baab650759a8e903356bb100a45 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 12 Jun 2008 11:26:31 +0000 Subject: [PATCH] Corrections about restoring of directories --- libisoburn/trunk/xorriso/xorriso.1 | 7 +++++-- libisoburn/trunk/xorriso/xorriso.c | 4 ++-- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- libisoburn/trunk/xorriso/xorrisoburn.c | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libisoburn/trunk/xorriso/xorriso.1 b/libisoburn/trunk/xorriso/xorriso.1 index 342e2f3a..7b5d3152 100644 --- a/libisoburn/trunk/xorriso/xorriso.1 +++ b/libisoburn/trunk/xorriso/xorriso.1 @@ -2,7 +2,7 @@ .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) -.TH XORRISO 1 "Jun, 11, 2008" +.TH XORRISO 1 "Jun, 12, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -1661,8 +1661,11 @@ ownership and group as in ISO image. \fB\-cp_rx\fR iso_rr_path [***] disk_path Like -cpx but also extracting whole directory trees from the ISO image. .br +The resulting disk paths are determined as with shell command cp -r : If disk_path is an existing directory then the trees will be inserted -underneath this directory and will keep their leaf names. +underneath this directory and will keep their leaf names. The ISO directory "/" +has no leaf name and thus gets mapped directly to disk_path. +.br If directories do already exist under disk_path then their content eventually gets merged with the content of restored directories of the same name. Directory attributes get extracted only if the disk diff --git a/libisoburn/trunk/xorriso/xorriso.c b/libisoburn/trunk/xorriso/xorriso.c index d40b39bb..21ab9c2e 100644 --- a/libisoburn/trunk/xorriso/xorriso.c +++ b/libisoburn/trunk/xorriso/xorriso.c @@ -8799,7 +8799,7 @@ int Xorriso_option_cpx(struct XorrisO *xorriso, int argc, char **argv, Xorriso_pacifier_reset(xorriso, 0); for(i= 0; irequest_to_abort; i++) { ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, optv[i], eff_origin, - 2); + 2|8); if(ret<=0 || xorriso->request_to_abort) goto problem_handler; @@ -8821,7 +8821,7 @@ int Xorriso_option_cpx(struct XorrisO *xorriso, int argc, char **argv, } } - if(is_dir) { + if(is_dir && strcmp(eff_origin, "/")!=0) { ret= Sfile_leafname(eff_origin, leafname, 0); if(ret<=0) goto problem_handler; diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 66e3c1ff..aba5baf3 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.06.11.131607" +#define Xorriso_timestamP "2008.06.12.112644" diff --git a/libisoburn/trunk/xorriso/xorrisoburn.c b/libisoburn/trunk/xorriso/xorrisoburn.c index b28df93e..f194156f 100644 --- a/libisoburn/trunk/xorriso/xorrisoburn.c +++ b/libisoburn/trunk/xorriso/xorrisoburn.c @@ -2836,7 +2836,7 @@ int Xorriso_handle_collision(struct XorrisO *xorriso, } else { target_is_dir= S_ISDIR(target_stbuf.st_mode); } - if(target_is_dir && (!target_is_link) && !(flag&2)) { + if(target_is_dir && (!target_is_link) && !(flag&1)) { strcpy(xorriso->info_text, "Attempt to replace DISK directory "); Text_shellsafe(nominal_disk_path, xorriso->info_text+strlen(xorriso->info_text), 0); @@ -2962,7 +2962,7 @@ much_too_long:; name= img_path+strlen(img_path); if(Sfile_str(disk_path, disk_dir_path, 0)<=0) goto much_too_long; - if(disk_path[0] || disk_path[strlen(disk_path)-1]!='/') + if(disk_path[0]==0 || disk_path[strlen(disk_path)-1]!='/') strcat(disk_path,"/"); disk_name= disk_path+strlen(disk_path);