aboutsummaryrefslogtreecommitdiff
path: root/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch')
-rw-r--r--meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch
new file mode 100644
index 00000000..6225dad3
--- /dev/null
+++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/fixes/Avoid-spurious-Run-items-in-application-handlers-con.patch
@@ -0,0 +1,57 @@
+From: Mike Hommey <glandium@debian.org>
+Date: Thu, 10 Jul 2008 21:40:08 +0200
+Subject: Avoid spurious "Run" items in application handlers configuration
+ pane
+
+---
+ browser/components/preferences/applications.js | 1 +
+ uriloader/exthandler/nsHandlerService.js | 11 +++++------
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/browser/components/preferences/applications.js b/browser/components/preferences/applications.js
+index abfec20..40cd81a 100644
+--- a/browser/components/preferences/applications.js
++++ b/browser/components/preferences/applications.js
+@@ -1345,6 +1345,7 @@ var gApplicationsPane = {
+ return aExecutable &&
+ aExecutable.exists() &&
+ aExecutable.isExecutable() &&
++ aExecutable.isFile() &&
+ // XXXben - we need to compare this with the running instance executable
+ // just don't know how to do that via script...
+ // XXXmano TBD: can probably add this to nsIShellService
+diff --git a/uriloader/exthandler/nsHandlerService.js b/uriloader/exthandler/nsHandlerService.js
+index c4e62f6..589ba31 100644
+--- a/uriloader/exthandler/nsHandlerService.js
++++ b/uriloader/exthandler/nsHandlerService.js
+@@ -658,25 +658,24 @@ HandlerService.prototype = {
+
+ try {
+ file.initWithPath(aPath);
+-
+- if (file.exists())
+- return file;
+ }
+ catch(ex) {
+ // Note: for historical reasons, we don't actually check to see
+ // if the exception is NS_ERROR_FILE_UNRECOGNIZED_PATH, which is what
+ // nsILocalFile::initWithPath throws when a path is relative.
+-
+ file = this._dirSvc.get("XCurProcD", Ci.nsIFile);
+
+ try {
+ file.append(aPath);
+- if (file.exists())
+- return file;
+ }
+ catch(ex) {}
+ }
+
++ if (file && file.exists() &&
++ file.isExecutable() &&
++ file.isFile())
++ return file;
++
+ return null;
+ },
+