Closed Bug 464443 Opened 16 years ago Closed 14 years ago

opening a file with the default helper app can fail with error message "associated helper application does not exist"

Categories

(Core Graveyard :: File Handling, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 327323

People

(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)

Details

Attachments

(1 file)

The bug was reported at
http://defect.opensolaris.org/bz/show_bug.cgi?id=4845

The downloading file's mime-type is application/x-bz2.
GNOME doesn't have a default app for it.
Then we check the extension .bz2.
We get a default app (file-roller) and mime-type application/x-bzip, description is Bzip file.
We show it to user, user click ok.
When the file is downloaded, we tried to launch it by default app of application/x-bz2.
The default app doesn't exist.
Attached patch patch (deleted) — Splinter Review
We should use the mime-type from extension match, that is x-bzip in this case.

It is the same logic of win/nsOSHelperAppService.cpp
Assignee: nobody → ginn.chen
Attachment #347750 - Flags: review?(cbiesinger)
Why don't we launch it with the app we got earlier, i.e. file-roller?
Biesinger,

Sorry I missed your comment for a while.

(In reply to comment #2)
> Why don't we launch it with the app we got earlier, i.e. file-roller?

That's exactly I'm trying to fix.
We got file-roller earlier by extension .bz2.
If the user agrees to launch the file with system default helper application, 
the action is useSystemDefault.
When we try to launch it, we query the default app with mime-type again.
(see http://mxr.mozilla.org/mozilla-central/source/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp#101)
The mime-type is set to application/x-bz2 by the code I'm trying to remove.
So it fails to find default app.
Is this a dupe of bug 455626?
Yes, I think so.
But I don't quite understand the patch in bug 455626.
I think it doesn't make sense to look up again.
And why would we need to do GetHasDefaultHandler(), hasDefault is no longer used before "return".

I think the patch here is simpler.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Comment on attachment 347750 [details] [diff] [review]
patch

Fixed by Bug 327323.
However it is another approach.
Attachment #347750 - Flags: review?(cbiesinger)
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: