Re: Suggestion for file type detection approach



On Sat, 2003-12-27 at 07:09, Ingo Ruhnke wrote:
> "John (J5) Palmieri" <johnp martianrock com> writes:
> 
> > Then how would you handle .rpm? If we rely on three letters to
> > define every media type that will ever be available then we will run
> > out of room very fast.
> 
> There is nothing that stops you from using more than three letters
> (unless you use MSDOS of course). Anyway, I don't consider having the
> filetype encoded in the filename a good idea either, having the
> filetype as a property that can exist beside the filename would be
> much prefered, however the fileextension are currently the only
> portable way to encode the filetype.
> 
> > 95% is realy good, where it doesn't work we need to fix.
> 
> 95% is very very bad, that means a handfull of unfixable wrong files
> on every second directory view. If the autodetection should stay the
> default it must be 100% accurate or provide a very easy way to
> circumvents it. And it should especially be transparent, currenty I
> have a bunch of files that get detected wrong, while pretty similar
> files get detected correct, this is pretty damn confusing and
> irritating.

your method would get more than 95% wrong for me, so content-sniffing
getting only 95% correct is looking pretty damn good to me :-)

I don't name my files with msdos extensions, why should I? this is UNIX.

as has been said 100 times at least (or maybe I've just gotten dup
mails), submit a bug report and a sample file for each one it sniffs
wrongly - it if sniffs incorrectly, then that is a bug that should get
fixed.

as for being slow, that's an implementation detail. has anyone profiled
the content sniffing code? I presume it only ever reads a small buffer
from the file? shouldn't need more than a handful of bytes from each
file to sniff it properly, the magic is generally in the first 8 bytes
or so.

the complaint about what editors come up in the right-click context menu
is also configurable via the user's mime-type settings dingus too,
right? why doesn't the original author simply add his favourite editor
to that?

I wouldn't be opposed to the nautilus devs adding an option to let the
user choose his pain - extension vs sniffing, but I'll leave that up to
them to decide (along with a UI person I suppose?)


anyways, this thread is never going to end because no one is going to
back down from their standpoint.

the only way for this to be dealt with is for someone to submit it to
bugzilla and let someone objective make the call.

Jeff




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]