Bug fix: -as mkisofs did not properly unescape target part of pathspecs

master
Thomas Schmitt 12 years ago
parent 1c1e86f168
commit 52c641d93c
  1. 21
      xorriso/emulators.c
  2. 6
      xorriso/opts_a_c.c
  3. 2
      xorriso/xorriso_timestamp.h

@ -908,7 +908,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
char sfe[5*SfileadrL], adr[SfileadrL+8], ra_text[80], pathspec[2*SfileadrL];
char *ept, *add_pt, eff_path[SfileadrL], indev[SfileadrL+8], msc[80], *cpt;
char old_root[SfileadrL];
char *boot_path, partno_text[8], *iso_rr_pt, *disk_pt;
char *boot_path, partno_text[8], *iso_rr_pt, *disk_pt, *rpt, *wpt;
char *rm_merge_args[3];
/* >>> This should not be static. Why is it ? */
@ -1602,9 +1602,22 @@ is_pathspec_2:;
iso_rr_pt= "/";
disk_pt= add_pt;
}
/* Unescape iso_rr_pt */
strcpy(eff_path, iso_rr_pt);
iso_rr_pt= eff_path;
for(wpt= rpt= iso_rr_pt; *rpt != 0; rpt++) {
if(*rpt == '\\') {
if(*(rpt + 1) == '\\')
rpt++;
else if(*(rpt + 1) == '=')
continue;
}
*(wpt++) = *rpt;
}
*wpt= 0;
if(root_seen) {
strcpy(eff_path, iso_rr_pt);
iso_rr_pt= eff_path;
ret= Sfile_prepend_path(xorriso->wdi, iso_rr_pt, 0);
if(ret<=0) {
Xorriso_msgs_submit(xorriso, 0, "Effective path gets much too long",
@ -1619,7 +1632,7 @@ is_pathspec_2:;
xorriso->allow_graft_points= 1;
zero= 0;
ret= Xorriso_option_add(xorriso, 1, &add_pt, &zero,
(was_path << 1) | (root_seen << 2));
(was_path << 1) | (root_seen << 2) | 8);
xorriso->allow_graft_points= mem_graft_points;
}
if(ret<=0)

@ -95,6 +95,7 @@ int Xorriso_option_acl(struct XorrisO *xorriso, char *mode, int flag)
/* @param flag bit0=do not report the added item
bit1=do not reset pacifier, no final pacifier message
bit2= prepend ISO working directory in any case
bit3= unescape \\
*/
int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv,
int *idx, int flag)
@ -128,9 +129,12 @@ int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv,
else
rpt= wpt= source;
for(; *rpt!=0; rpt++) {
if(*rpt=='\\')
if(*rpt=='\\') {
if(*(rpt+1)=='=')
continue;
if((flag & 8) && *(rpt + 1) == '\\')
rpt++;
}
*(wpt++)= *rpt;
}
*wpt= 0;

@ -1 +1 @@
#define Xorriso_timestamP "2011.03.06.153741"
#define Xorriso_timestamP "2011.03.07.101547"

Loading…
Cancel
Save