On Thu, Dec 21, 2006 at 11:45:34AM +0100, Georg Baum wrote:
> Am Dienstag, 19. Dezember 2006 22:54 schrieb Enrico Forestieri:
> 
> > I think that fileSearch was intended to have always passed filenames with
> > extensions.
> 
> No, I checked that. fileSearch does either get a filename without an 
> extension, or a filename with the wanted extension (see e.g. line 1187 in 
> lyxfunc.C). That makes sense to me: It allows the user to omit the 
> extension of a filename if there is a default extension.
> 
> > However, an addExtension method seems too trivial to be 
> > implemented on its own.
> 
> It is indeed trivial, but it is very useful to avoid a misunderstanding 
> like the one with fileSearch above. I know of more places where it can be 
> used, and I implemented removeExtension for the very same reason (after a 
> suggestion by Angus IIRC).
> 
> > What about the attached patch?
> 
> I modified it, for the reasons I gave above. Would this one be OK with you?

Yes, it is. Please apply it and also remember to update Status.15x as this
also solves the bug where "kornel.default.ui" is mentioned. I was working
on a patch using the add_extension flag, but given that you verified that
if an extension is passed to fileSearch this is always the right one, it
is not necessary anymore and so your patch is simpler.

-- 
Enrico

Reply via email to