diff --git a/xorriso/opts_i_o.c b/xorriso/opts_i_o.c index c8905904..6191c305 100644 --- a/xorriso/opts_i_o.c +++ b/xorriso/opts_i_o.c @@ -315,19 +315,27 @@ logfile_wrong_form:; /* Options -ls alias -lsi and -lsl alias -lsli and -lsd alias -lsdi and -lsdl alias -lsdli and -du alias -dui and -dus alias -dusi - @param flag bit0= long format (-lsl , -du) + @param flag bit0= long format (-lsl , -du, not -dus, not -ls) bit1= do not expand patterns but use literally - bit2= du rather than ls - bit3= list directories as themselves (ls -d) + bit2= -du rather than -ls + bit3= list directories as themselves (-lsd) */ int Xorriso_option_lsi(struct XorrisO *xorriso, int argc, char **argv, int *idx, int flag) { - int ret, end_idx, filec= 0, nump, i; + int ret, end_idx, filec= 0, nump, i, star= 1; char **filev= NULL, **patterns= NULL; off_t mem= 0; struct stat stbuf; + if(flag & 4) { + if(!(flag & 1)) + star= 0; + } else { + if(flag & 8) + star= 0; + } + end_idx= Xorriso_end_idx(xorriso, argc, argv, *idx, 1); if(xorriso->do_iso_rr_pattern==0) flag|= 2; @@ -357,19 +365,22 @@ no_memory:; {ret= -1; goto ex;} } nump= 1; - if(flag&8) - patterns[0]= "."; - else + if(star) patterns[0]= "*"; + else + patterns[0]= "."; flag&= ~2; } else { patterns= calloc(nump, sizeof(char *)); if(patterns==NULL) goto no_memory; for(i= 0; i