Warning of wildcards in paths

This commit is contained in:
Thomas Schmitt 2007-10-28 17:45:01 +00:00
parent 0029fd4c87
commit 9efa6aaac7
2 changed files with 18 additions and 8 deletions

View File

@ -2961,6 +2961,18 @@ ex:
}
int Xorriso_warn_of_wildcards(struct XorrisO *xorriso, char *path, int flag)
{
if(strchr(path,'*')!=NULL || strchr(path,'?')!=NULL) {
sprintf(xorriso->info_text,
"Xorriso does not support address wildcards '*' and '?'");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
return(1);
}
return(0);
}
int Xorriso_end_idx(struct XorrisO *xorriso,
int argc, char **argv, int idx, int flag)
{
@ -2969,12 +2981,8 @@ int Xorriso_end_idx(struct XorrisO *xorriso,
for(i= idx; i<argc; i++) {
if(strcmp(argv[i], "--")==0)
break;
if((strchr(argv[i],'*')!=NULL || strchr(argv[i],'?')!=NULL) && !warned) {
sprintf(xorriso->info_text,
"Xorriso does not support address wildcards '*' and '?'");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
warned= 1;
}
if(!warned)
warned= Xorriso_warn_of_wildcards(xorriso, argv[i], 0);
}
return(i);
}
@ -3282,6 +3290,7 @@ int Xorriso_option_cdi(struct XorrisO *xorriso, char *iso_rr_path, int flag)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0);
}
Xorriso_warn_of_wildcards(xorriso, iso_rr_path, 0);
sprintf(xorriso->info_text,"previous working directory:\n");
Xorriso_info(xorriso,0);
sprintf(xorriso->result_line,"%s/\n",Text_shellsafe(xorriso->wdi, sfe, 0));
@ -3304,7 +3313,7 @@ int Xorriso_option_cdi(struct XorrisO *xorriso, char *iso_rr_path, int flag)
return(ret);
if(ret==0) {
sprintf(xorriso->info_text, "-cdi: not existing yet in ISO image : %s",
Text_shellsafe(eff_path, sfe, 0));
Text_shellsafe(path, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
ret= Xorriso_normalize_img_path(xorriso, path, eff_path, 2);
if(ret<=0)
@ -3334,6 +3343,7 @@ int Xorriso_option_cdx(struct XorrisO *xorriso, char *disk_path, int flag)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0);
}
Xorriso_warn_of_wildcards(xorriso, disk_path, 0);
sprintf(xorriso->info_text,"previous working directory on hard disk:\n");
Xorriso_info(xorriso,0);
sprintf(xorriso->result_line,"%s/\n",Text_shellsafe(xorriso->wdx, sfe, 0));

View File

@ -1 +1 @@
#define Xorriso_timestamP "2007.10.28.165516"
#define Xorriso_timestamP "2007.10.28.174550"