>>>     abspat = File::expand_path(start, cwd)
>>> -    [nil, Dir.glob(abspat + (File.extname(abspat).empty? ? '{,.pp,.rb}' : 
>>> '' )).reject { |f| FileTest.directory?(f) }]
>>> +    [nil, Dir.glob(abspat + (File.extname(abspat).empty? ? '{.pp,.rb}' : 
>>> '' )).reject { |f| FileTest.directory?(f) }]
>>>   end
>>
>> Hmm.  This fixes it for the "foo*" case, but breaks it for the
>> "foo*pp" case (it would then only match "foo*pp.pp").  That's not a
>> likely case (and could just be rewritten as "foo*.pp") but still.
>> Would it make sense to throw a ".uniq"  on there right before the
>> reject instead?
>
> That was how I first fixed it, then went back to modification of the
> glob pattern since I didn't thought about your (highly impobable)
> pattern :-)
> I guess using uniq is better and covers everything.

Yeah, I'm up to about five minds on this myself.  Luke had suggested
an even broader net, essentially a "{,.*}" glob, uniq, and then filter
on known types, but I had niggling issues with that as well.  To bad
there isn't a "give me exactly and only the files I'm interested in,
regardless of how they are named, with no duplication" option, but
other than BeOS I don't think that's ever been supported.

-- Markus
-----------------------------------------------------------
The power of accurate observation is
commonly called cynicism by those
who have not got it.  ~George Bernard Shaw
------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to