From fa63a9bd31c78a5b16d6dd5485414fe448e86c74 Mon Sep 17 00:00:00 2001 From: Michael Ventnor Date: Fri, 12 Dec 2008 15:49:52 -0800 Subject: [PATCH] Bug 416466 - "Extra useless option in file handling options" [r=myk] --- toolkit/mozapps/downloads/content/helperApps.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/toolkit/mozapps/downloads/content/helperApps.js b/toolkit/mozapps/downloads/content/helperApps.js index 3f9fb31ce5bd..e5884a1bc1f7 100755 --- a/toolkit/mozapps/downloads/content/helperApps.js +++ b/toolkit/mozapps/downloads/content/helperApps.js @@ -597,7 +597,13 @@ HandlerOverride.prototype = { set appDisplayName(aDisplayName) { - this.changeMIMEStuff(APP_URI(this.mimeType), "prettyName", aDisplayName); + if (aDisplayName) + this.changeMIMEStuff(APP_URI(this.mimeType), "prettyName", aDisplayName); + else { + var currentValue = this.getLiteralForContentType(APP_URI(this.mimeType), "prettyName"); + this.unassertMIMEStuff(APP_URI(this.mimeType), "prettyName", currentValue); + } + return aDisplayName; }, @@ -608,7 +614,13 @@ HandlerOverride.prototype = { set appPath(aAppPath) { - this.changeMIMEStuff(APP_URI(this.mimeType), "path", aAppPath); + if (aAppPath) + this.changeMIMEStuff(APP_URI(this.mimeType), "path", aAppPath); + else { + var currentValue = this.getLiteralForContentType(APP_URI(this.mimeType), "path"); + this.unassertMIMEStuff(APP_URI(this.mimeType), "path", currentValue); + } + return aAppPath; },