Bug fix: -as mkisofs -path-list did not switch to --no-emul-toc by default

This commit is contained in:
Thomas Schmitt 2013-05-16 08:39:11 +00:00
parent f3c2f12521
commit 0917214481

View File

@ -1087,6 +1087,50 @@ ex:;
} }
int Xorriso_genisofs_path_pecul(struct XorrisO *xorriso, int *was_path,
int with_emul_toc, int *allow_dir_id_ext,
int *iso_level, int flag)
{
char *sfe= NULL;
int ret;
if(*was_path) {
ret= 1; goto ex;
}
*was_path= 1;
Xorriso_alloc_meM(sfe, char, 5*SfileadrL);
/* Enforce odd mkisofs defaults on first pathspec */
xorriso->pacifier_style= 1;
if(xorriso->allow_dir_id_ext_dflt && *allow_dir_id_ext < 0)
*allow_dir_id_ext= 1;
if(*allow_dir_id_ext == 1) {
Xorriso_relax_compliance(xorriso, "allow_dir_id_ext", 0);
*allow_dir_id_ext= 2;
}
if(xorriso->iso_level_is_default && *iso_level < 0)
*iso_level= 1;
if(*iso_level >= 1 && *iso_level <= 3) {
sprintf(sfe, "iso_9660_level=%d", *iso_level);
Xorriso_relax_compliance(xorriso, sfe, 0);
iso_level= 0;
}
/* For the sake of compatibility give up emulated multi-session by default
*/
if(with_emul_toc == 0)
xorriso->no_emul_toc|= 1;
/* mkisofs records mtime in ECMA-119 and Joliet
*/
Xorriso_relax_compliance(xorriso, "rec_mtime", 0);
Xorriso_free_meM(sfe);
ret= 1;
ex:;
return(ret);
}
/* micro emulation of mkisofs */ /* micro emulation of mkisofs */
int Xorriso_genisofs(struct XorrisO *xorriso, char *whom, int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int argc, char **argv, int flag) int argc, char **argv, int flag)
@ -1580,12 +1624,15 @@ not_enough_args:;
ret= 0; goto ex; ret= 0; goto ex;
} }
i++; i++;
was_path= 1;
xorriso->pacifier_style= 1; xorriso->pacifier_style= 1;
ret= Xorriso_option_path_list(xorriso, argv[i], ret= Xorriso_option_path_list(xorriso, argv[i],
(strcmp(argpt, "--quoted_path_list")==0)); (strcmp(argpt, "--quoted_path_list")==0));
if(ret<=0) if(ret<=0)
goto problem_handler_2; goto problem_handler_2;
ret = Xorriso_genisofs_path_pecul(xorriso, &was_path, with_emul_toc,
&allow_dir_id_ext, &iso_level, 0);
if(ret <= 0)
goto ex;
} else if(strcmp(argpt, "-f")==0 || strcmp(argpt, "-follow-links")==0) { } else if(strcmp(argpt, "-f")==0 || strcmp(argpt, "-follow-links")==0) {
/* was already handled in first argument scan */; /* was already handled in first argument scan */;
} else if(strcmp(argpt, "-pad")==0) { } else if(strcmp(argpt, "-pad")==0) {
@ -2082,30 +2129,11 @@ rr_reloc_dir:;
if(ret<=0) if(ret<=0)
goto problem_handler_2; goto problem_handler_2;
was_path= 1;
/* Enforce odd mkisofs defaults on first pathspec */ /* Enforce odd mkisofs defaults on first pathspec */
xorriso->pacifier_style= 1; ret = Xorriso_genisofs_path_pecul(xorriso, &was_path, with_emul_toc,
if(xorriso->allow_dir_id_ext_dflt && allow_dir_id_ext < 0) &allow_dir_id_ext, &iso_level, 0);
allow_dir_id_ext= 1; if(ret <= 0)
if(allow_dir_id_ext == 1) { goto ex;
Xorriso_relax_compliance(xorriso, "allow_dir_id_ext", 0);
allow_dir_id_ext= 2;
}
if(xorriso->iso_level_is_default && iso_level < 0)
iso_level= 1;
if(iso_level >= 1 && iso_level <= 3) {
sprintf(sfe, "iso_9660_level=%d", iso_level);
Xorriso_relax_compliance(xorriso, sfe, 0);
iso_level= 0;
}
/* For the sake of compatibility give up emulated multi-session by default
*/
if(with_emul_toc == 0)
xorriso->no_emul_toc|= 1;
/* mkisofs records mtime in ECMA-119 and Joliet
*/
Xorriso_relax_compliance(xorriso, "rec_mtime", 0);
} }
continue; /* regular bottom of loop */ continue; /* regular bottom of loop */
problem_handler_2:; problem_handler_2:;