Lars Gullik Bjønnes wrote:

> btw. I do not agree with the logic of getExtFromContents, first of all
> it should be named getFileType :-)


I have absolutely no problems to agree with important facts ... ;-)


> The more important issue is if the  contents turn out to be an unknown
> file type, but the extension is known. And also that we really should
> know the contents if the extension is right.
> 
> f.ex.
> 
>         cp bin/lyx tmp.jpg
> 
> getExtFronContents would return jpg... which is obviously wrong, and
> in the code we can easily know that it is wrong. Stuff like this will
> most likely lead to strange errors/crashes.


that were my arguments in the past to ignore the extension!

It was not my idea to return ext, when nothing was found. The
return of "user" is enough to handle "unknown" stuff.

Herbert



-- 
http://www.lyx.org/help/

Reply via email to