Add '#' to the characters VIS_GLOB encodes. This fixes a bug in mtree.

This commit is contained in:
Poul-Henning Kamp 2003-10-30 12:41:50 +00:00
parent b585dc87cc
commit b778a32374
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121737
2 changed files with 3 additions and 2 deletions

View File

@ -138,7 +138,7 @@ The following flags
alter this:
.Bl -tag -width VIS_WHITEX
.It Dv VIS_GLOB
Also encode magic characters ('*', '?', '[') recognized by
Also encode magic characters ('*', '?', '[' and '#') recognized by
.Xr glob 3
.It Dv VIS_SP
Also encode space.

View File

@ -71,7 +71,8 @@ vis(dst, c, flag, nextc)
}
}
if ((flag & VIS_GLOB) && (c == '*' || c == '?' || c == '['))
if ((flag & VIS_GLOB) &&
(c == '*' || c == '?' || c == '[' || c == '#'))
;
else if (isgraph(c) ||
((flag & VIS_SP) == 0 && c == ' ') ||