...
 
......@@ -871,6 +871,13 @@ int Xorriso_graft_in(struct XorrisO *xorriso, void *boss_iter,
apt= npt= path;
if(!(flag & (1 | 1024))) {
if(disk_path[0] == 0) {
Xorriso_msgs_submit(xorriso, 0, "/", 0, "ERRFILE", 0);
sprintf(xorriso->info_text,
"Will not graft-in the whole local filesystem by path '/'");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
ret= lstat(disk_path, &stbuf);
if(ret!=-1) {
if(S_ISDIR(stbuf.st_mode))
......
......@@ -113,8 +113,7 @@ int Xorriso_prepare_regex(struct XorrisO *xorriso, char *adr, int flag)
if(adr_part[0]==0)
goto next_adr_part;
if(adr_part[0]=='.' && adr_part[1]==0 &&
(xorriso->re_fill>0 || i<count-1))
if(adr_part[0] == '.' && adr_part[1] == 0)
goto next_adr_part;
if(adr_part[0]=='.' && adr_part[1]=='.' && adr_part[2]==0) {
/* delete previous part */
......@@ -159,6 +158,12 @@ next_adr_part:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE",0);
{ret= 0; goto ex;}
}
if(xorriso->re_fill == 0 && is_still_relative) {
/* "." and its equivalents end up here */
if(Sregex_string(&(xorriso->re_constants[0]), ".", 0) <=0)
{ret= -1; goto ex;}
xorriso->re_fill= 1;
}
Xorriso__bourne_to_reg(adr_start,xorriso->reg_expr,0); /* just for show */
......
......@@ -121,6 +121,7 @@ int Xorriso_opt_args(struct XorrisO *xorriso, char *cmd,
*optc= *end_idx - idx;
*optv= NULL;
if(*optc<=0 || !do_expand) {
copy_args:;
if(*optc > 0) {
Xorriso_alloc_meM(*optv, char *, *optc);
for(i= 0; i < *optc; i++) {
......@@ -153,7 +154,7 @@ no_memory:;
}
if(nump<=0) { /* Only empty texts. May the caller get happy with them. */
free(patterns);
return(1);
goto copy_args;
}
if(flag&2)
ret= Xorriso_expand_disk_pattern(xorriso, nump, patterns, was_empty,
......
#define Xorriso_timestamP "2019.08.14.144754"
#define Xorriso_timestamP "2019.09.01.072438"