[issue1399] fnmatch(3) escapes '0' to '\'
Stathis Kamperis (via DragonFly issue tracker)
sinknull at leaf.dragonflybsd.org
Sat Jun 13 19:15:30 PDT 2009
Stathis Kamperis <ekamperi at gmail.com> added the comment:
>> Suppose that we supply fnmatch(3) with a pattern of the form "\" (that is '\'
>> followed by '0') without setting the FNM_NOESCAPE flag. Wouldn't the normal
>> thing to do is escape the terminating character and return just '0' ? Instead
>> '\' is returned. As if one has provided a pattern "\\".
> I guess that also happens for any other trailing \. In this case I'd keep
> the current behavior, because I'd expect more the \ to be used, than it to
> just disappear.
It happens only with the last \ before '0'. But what bugs me most, is that it
escapes it while we are in non-escape mode (FNM_NOESCAPE flag set).
Cheers,
Stathis
_____________________________________________________
DragonFly issue tracker <bugs at lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1399>
_____________________________________________________
More information about the Bugs
mailing list