On Wed, Oct 27, 2004 at 10:30:32PM +0100, Stephen Watson wrote:
> "Matthew Weier O'Phinney" <mattheww@...> wrote:
> > -- la le <ditopil@...> wrote
> > (on Wednesday, 27 October 2004, 11:40 AM -0700):
> > > i was wondering if you guys and gals could possibly
> > > add optional support for executing files based on
> > > there magic number, as there's plenty of files that
> > > have incorrect extensions, or no extentions at all ...
> > I believe that ROX is setup to look first at the extension, then at the
> > magic number. I know from experience that, for instance, if you look at
> > the .DirIcon file in an AppDir, you'll see the correct MIME type -- and
> > that file doesn't contain the proper extension.
> No, it doesn't check the file contents at all. Too slow. The filer
> installs a special mapping for .DirIcon.
2.1.4 can check file contents too, but you need to compile with
gnomevfs-2.8.0 or later. Contents are always checked after names (we match
on whole names, not just extensions, so 'Makefile' works too, etc).
I'd like to make it a bit more flexible in future (eg, allow contents
matching to be turned off even if you have gnomevfs, and do the binding to
gnomevfs at runtime, not compile time, for better binary compatibility).
Also, it could be made more efficient (I think we check names twice at
Dr Thomas Leonard http://rox.sourceforge.net
tal at ecs.soton.ac.uk tal197 at users.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1