Closed Bug 383364 Opened 18 years ago Closed 17 years ago

GetTypeFromFile should use gnome-vfs on Unix

Categories

(Core Graveyard :: File Handling, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 296443

People

(Reporter: bzbarsky, Unassigned)

Details

Recent GNOME versions no longer do extension-to-type mappings, as I understand, so opening local files in Firefox on Linux doesn't work so hot because we can't tell what type the file is. We should be using gnome_vfs_get_file_mime_type or some such in nsExternalHelperAppService::GetTypeFromFile.
Flags: blocking1.9?
We actually do use this, you just have to dig very deep: GetTypeFromFile() GetTypeFromExtension() GetMIMEInfoFromOS() nsGNOMERegistry::GetFromExtension: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp&rev=1.14&mark=290#275 so I guess this is INVALID?
No. The point is that we DON'T want to get the type from extension, because the GNOME stuff in recent GNOME versions has basically completely ditched extensions. So not only are the extension-to-type mappings no longer reliable (if existing at all; not sure they even exist), but files created by native GNOME apps don't necessarily have the "right" extensions (because the type-to-extension mappings certainly no longer exist). In other words, the codepath you cited basically no longer works. We want GetTypeFromFile to use the gnome-vfs APIs that actually look at the _file_ and determine its type, to work correctly. > so I guess this is INVALID? Give me some credit for knowing what I'm talking about here. ;)
Dupe of bug 296443? The freedesktop mime specs is part of why the old extension based mime type API in gnome-vfs is deprecated - we need to pass the entire filename in order to match files that do not have extensions.
> Dupe of bug 296443? Looks like it.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.