Re: Nautilus, metadata and extendet attributes



> If extensions are used for determining file types but sniffing is used
> when files are clicked, shell scripts can pass by.  I don't know if
> Nautilus executes shell scripts upon clicking, but this is not the
> point.
> 

If you have a shell script called script.jpg, it will first be detected
as a picture, and clicking on it will activate sniffing on it. Then,
Nautilus will see it's actually a shell script, falling back to the
default behavior for shell scripts, which is: ask for the user whether
she wants to display it in a text editor or execute it.

The user is warn, that's OK. 

> If users have associated Windows executable files with WINE, for
> example, wine will run files whether they have extensions or not, as
> long as they are PE (portable executable) files.  Users can then receive
> something masquerading as a picture, but upon run, discover that their
> files are gone.  That the risk is 1-in-100000 does not matter.
> 

That's why I am strongly in favor of ALWAYS warning users about files
with extensions not matching their sniffed mime-type. Nautilus should
never open a file with a sniffed mime-type that is different from the
mime-type detected via its extension.

> The point is that encoding file type information in the file name is
> wrong.  To a big extent, files already "know" which file type are
> themselves, the problem is that the file manager is slow in determining
> file types because it has to sniff.
> 

We all know that using the file name's extension to determine the
mime-type is a bad idea, but it's better than having to wait dozens of
seconds to open a local folder full of pictures/music.

> Extensions are just a hack, not a proper file type specification.  The
> current status quo is, therefore, a hack.  Unknowing users will always
> trample on that hack in the most unexpected way.  I myself have intended
> to rename files and kill the extension in the process.   That's exactly
> why Windows Explorer hides extensions by default.  And if Nautilus goes
> that route to avoid "user stupidity" (which is actually programmer
> stupidity) we'll end up with the same situation as with Windows
> Explorer.
> 

Yes, but you still have to find a solution to the slowness problem.

> Besides, it's about time I should be able to have OpenOffice files on my
> folders that don't have an extension, yet they open properly when I
> double-click them.  Get the point?
> 

Well, if a file doesn't have any extension, Nautilus will use sniffing
to determine its file type when you try to open it. Isn't it what you
want ?

-- 
Julien Olivier <julo altern org>



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