Re: File type by extension is evil (was Re: Why the DOS has manyntfs read and write driver,but the linux can't for a long time)

From: Lee Revell
Date: Tue Jan 10 2006 - 15:26:51 EST


On Tue, 2006-01-10 at 11:32 +0100, Bernhard R. Link wrote:
> * Olivier Galibert <galibert@xxxxxxxxx> [060109 19:44]:
> > >From what I can see it does icons on non-executable entirely based on
> > the extension and nothing else on the first pass.
> >
> > Not a bad strategy, too. Doing a file(1) on everything can only be
> > slow given the random disk accesses it generates. Maybe a file(1) as
> > a _second_ pass would work.
>
> That may be a good strategy if you have user conditioned to all the
> effects you get by this (i.e. if you only focus on Windows users and
> want them provide with a system as broken as they know it) and programs
> adopted to cope with the most ill effects (ever asked why some browsers
> always foozle the name of downloaded files with some .html or the like?)
>
> For everyone else looking at the file is the only sane way to know the type
> of file.

OK so it's prohibitively expensive to get the file type so this is not
something Nautilus should be doing to every file before even starting to
display the icons.

Lee

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/