From 9cbd3423c200b4ccda250d8cc5b40326607d6c09 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 10 Feb 2008 12:21:05 +0000 Subject: [PATCH] Fixed bugs about -mv /im/age . -cdx / -cpr di/sk im/age -- -cpr di/sk . -- --- libisoburn/trunk/xorriso/xorriso.1 | 8 ++++++-- libisoburn/trunk/xorriso/xorriso.c | 2 ++ libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- libisoburn/trunk/xorriso/xorrisoburn.c | 5 ++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/libisoburn/trunk/xorriso/xorriso.1 b/libisoburn/trunk/xorriso/xorriso.1 index 2851b12b..b6748e95 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 "February 8, 2008" +.TH XORRISO 1 "February 10, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -456,7 +456,11 @@ If other file types collide then the setting of command decides. .br Renaming of files has similar collision handling, but directories can only -be replaced, not merged. +be replaced, not merged. Directories can hardly collide on renaming because +of the shell-like behavior of -mv: if a file object hits an existing directory +then it gets inserted rather than trying to replace that directory. +Nevertheless, the overwriting rules apply if an operation of xorriso +ever attempts to do such a replacement. .PP The commands in this section alter the ISO image and not the local filesystem. .TP diff --git a/libisoburn/trunk/xorriso/xorriso.c b/libisoburn/trunk/xorriso/xorriso.c index 6e9bc0fd..b4e5a69d 100644 --- a/libisoburn/trunk/xorriso/xorriso.c +++ b/libisoburn/trunk/xorriso/xorriso.c @@ -4391,6 +4391,8 @@ int Xorriso_expand_disk_pattern(struct XorrisO *xorriso, abs_adr= 4; } else { strcpy(dir_adr, xorriso->wdx); + if(dir_adr[0]==0) + strcpy(dir_adr, "/"); ret= Sfile_type(dir_adr, 1|4); if(ret!=2) { sprintf(xorriso->info_text, diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index d42599e9..6cea9ae5 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.02.09.100750" +#define Xorriso_timestamP "2008.02.10.122020" diff --git a/libisoburn/trunk/xorriso/xorrisoburn.c b/libisoburn/trunk/xorriso/xorrisoburn.c index 470b989b..43fc9159 100644 --- a/libisoburn/trunk/xorriso/xorrisoburn.c +++ b/libisoburn/trunk/xorriso/xorrisoburn.c @@ -1052,8 +1052,10 @@ int Xorriso_normalize_img_path(struct XorrisO *xorriso, char *wd, break; continue; } - if(strcmp(apt,".")==0) + if(strcmp(apt,".")==0) { + is_dir= 1; continue; + } if(strcmp(apt,"..")==0) { if(!(flag&2)) { node= (IsoNode *) dir; @@ -1072,6 +1074,7 @@ bonked_root:; if(cpt==NULL) /* ??? if not flag&2 then this is a bug */ goto bonked_root; *cpt= 0; + is_dir= 1; continue; } ret= Sfile_add_to_path(eff_path, apt, 0);