diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-10-16 17:03:02 +0000 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-10-16 17:03:02 +0000 |
commit | f8a92acfcb1ad010d7a2497e63c1b76d63493d77 (patch) | |
tree | 069ac02fe047747f661a4ec72c94e2610aa9844a /embed/mozilla/ContentHandler.cpp | |
parent | b178c18128b1014ac7b8dcde166911d2a1d13173 (diff) | |
download | epiphany-new-downloader.tar.gz |
pass handler with full path, not only exec name. I dont get how it workednew-downloader
2003-10-16 Marco Pesenti Gritti <marco@gnome.org>
* embed/mozilla/ContentHandler.cpp:
pass handler with full path, not only
exec name. I dont get how it worked before.
Diffstat (limited to 'embed/mozilla/ContentHandler.cpp')
-rw-r--r-- | embed/mozilla/ContentHandler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp index c7259a1f9..519bff738 100644 --- a/embed/mozilla/ContentHandler.cpp +++ b/embed/mozilla/ContentHandler.cpp @@ -454,15 +454,20 @@ NS_METHOD GContentHandler::SetHelperApp(GnomeVFSMimeApplication *aHelperApp, NS_METHOD GContentHandler::SynchroniseMIMEInfo (void) { nsresult rv; + char *command_with_path; + nsCOMPtr<nsIMIMEInfo> mimeInfo; rv = mLauncher->GetMIMEInfo(getter_AddRefs(mimeInfo)); if(NS_FAILED(rv)) return NS_ERROR_FAILURE; + command_with_path = g_find_program_in_path (mHelperApp->command); + if (command_with_path == NULL) return NS_ERROR_FAILURE; nsCOMPtr<nsILocalFile> helperFile; - rv = NS_NewNativeLocalFile(nsDependentCString(mHelperApp->command), + rv = NS_NewNativeLocalFile(nsDependentCString(command_with_path), PR_TRUE, getter_AddRefs(helperFile)); if(NS_FAILED(rv)) return NS_ERROR_FAILURE; + g_free (command_with_path); rv = mimeInfo->SetPreferredApplicationHandler(helperFile); if(NS_FAILED(rv)) return NS_ERROR_FAILURE; |