summaryrefslogtreecommitdiff
path: root/embed/mozilla/ContentHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/ContentHandler.cpp')
-rw-r--r--embed/mozilla/ContentHandler.cpp7
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;