Closed
Bug 383364
Opened 18 years ago
Closed 18 years ago
GetTypeFromFile should use gnome-vfs on Unix
Categories
(Core Graveyard :: File Handling, defect)
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?
Comment 1•18 years ago
|
||
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?
Reporter | ||
Comment 2•18 years ago
|
||
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. ;)
Comment 3•18 years ago
|
||
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.
Reporter | ||
Comment 4•18 years ago
|
||
> Dupe of bug 296443?
Looks like it.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•