Hi, On Sun, Aug 15, 2010 at 12:58:18PM +0200, Sebastian Harl wrote: > > So the described behavior is expected and has been like this since > > the feature was introduced in version 4.3 (Lenny features 4.4.2-3). > > If you have any idea how I could detect a "pattern not found" > > condition, please let me know. > > Well, in case wordexp() returned a single "match" and that file does > not exist and the filename includes any of the characters '*', '?' or > '[' (wordexp() should return an error already, if there is an > unmatched bracket, I presume) and if that character is not escaped, > that file could be ignored.
I don't think that's a good idea: Imagine someone making a mistake in the Include directive, for example giving "*.cnof". Then the broken out config files will be ignored because the pattern doesn't match without any indication, which I don't think is very user friendly. With this in mind, I think that including a pattern that doesn't expand to a file is an error and should be reported to the user. Since other tools, such as "ls", report a "file not found" in this case, too, the error message we give should be familiar to most users and help them find the source of the problem quickly. That's, imho, the best we can do here. I'm open for suggestions, though :) Regards, --octo -- Florian octo Forster Hacker in training GnuPG: 0x91523C3D http://verplant.org/
signature.asc
Description: Digital signature