Re: Why file content sniffing sucks
- From: Ingo Ruhnke <grumbel gmx de>
- To: iain <iain prettypeople org>
- Cc: gnome-devel-list gnome org
- Subject: Re: Why file content sniffing sucks
- Date: Fri, 26 Dec 2003 14:37:47 +0100
iain <iain prettypeople org> writes:
> Why should it be an optional feature?
> [ ] Use really broken file identification based on extension type that
> can never be fixed
User can rename the file-suffix in a matter of seconds, applications
that force a correct suffix don't even allow the user to get it wrong
in the first place.
> [ ] Use file identification based on contents of file that can be fixed
> by tweaking algorithm
Resulting in often broken behaviour that is unfixable by the user and
renders the whole filemanager unusable, requires a programmer to fix,
which is not even possible in all cases.
> Hmmm, great options there.
> How do you ID the following files
>
> "README"
plain-text, filename is enough for a guess
> "wine"
executable, detected by executable bit set.
> "my-sexy-picture.jpg"
>
> Hmmm, dunno, dunno, oh jpg...whoops, no, it was an executable trojan
> renamed to a jpg to trick me into running it.
Guess on the suffix and open it in an image viewer, I don't see the
problem. The only really brokenness of windows is that it hides
suffixes at default, which is really evil.
> Short less facetious answer: File content sniffing is less broken
> than any other method of IDing a filetype, and if it is broken, then
> the algorithm needs tweaking to make it better.
Content guessing is impossible to get always right, since files can be
more than one type of files at once, ie a shell script is a plain text
file, while being an executable at the same time, an .obj file is a
plain text file, while at the same time being a 3d model format. There
are files that are shell-script and makefile at the same time.
Content-guessing alone will never get correct results in this cases,
however the file-suffix is a simple way to flag a file for a specific
use case.
> It is not an "optional feature" and doesn't need to be.
This makes Nautilus pretty much unusable once you get in contact with
filetypes that it doesn't already know, which happens for me every
other day.
--
WWW: http://pingus.seul.org/~grumbel/
JabberID: grumbel jabber org
ICQ: 59461927
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]