[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KDE and the executable bit
From:       David Faure <faure () kde ! org>
Date:       2008-01-28 11:30:57
Message-ID: 200801281230.57619.faure () kde ! org
[Download RAW message or body]

On Saturday 26 January 2008, Andras Mantia wrote:
> The above test.txt 
> is no different from the same file called test.sh.

It is. By naming it .txt you are asking for the file to be considered as text/plain.

I don't think it would be a good idea to treat any +x file as a shellscript. Especially
with some filesystems (like FAT) making everything +x....
-rwxrwx---  1 root plugdev     169 2003-09-17 02:19 boot.ini

GUI applications are not like a shell. In a shell you choose between ./boot.ini (if you really
wanted to execute it) and "cat boot.ini".
However in a GUI you just click on it, and KDE has to "do the right thing".
I don't think that considering every file with +x as a script is "doing the right thing",
it would just lead to too many problems (false positives).
What should happen if you give +x to a JPG file for instance?

So, honouring the extension is the least we can do to find a better mimetype than
"this has +x so surely it must be something that can be executed" - far from true in many cases.
"*.sh" is a much better and precise information.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic