Re: Suggestion for file type detection approach



The suffix should be more authoritive than the content, at least in
some cases, ie when I name a .html, .xml file or whatever .txt, I want
it to be handled as plain text, not launch mozilla once I click on it.


.html/.xml files should be handled as text/plain? Hmmm... It seems you are confusing proper behaviour and the way *you* want things to work to fit your habits.

Surely the way *you* want things to work should be configurable somewhere though, without editing the source code and recompiling. The way one person wants something to work is probably also the way a large percentage of people using Nautilus want it to work. Both ways are good, it should be an option with some sort of configuration. Perhaps a per-directory setting, or per-suffix.

Only scan the contents of files which claim to be jpegs or mp3s perhaps.

I guess you could just alter the default application for .xml files to sort out any xml file problems by changing it to an editor instead of a browser. The options for that are already present. That doesn't really solve any big problems though, just the personal preference for xml files.

I still stick with the ideas I posted in my previous message about having a user specify suffix file-type resolution in certain directories and relying on content-based file-type resolution by default.

Perhaps it could depend on the amount of files in a directory though, that could be useful. If there are upwards of 200 files in a directory then rely on suffixes unless prompted to scan by content by the user.
The large majority of files are suffixed correctly, in my experience.


Stuart Gilbert.




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