Bug 389766 - "Hard-to-understand presentation of protocol-handlers on Linux" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr=biesi a=blocking-firefox3+]

This commit is contained in:
reed@reedloden.com 2007-12-03 14:18:03 -08:00
parent b3718507bf
commit b707196872

View File

@ -274,6 +274,18 @@ nsGNOMERegistry::GetAppDescForScheme(const nsACString& aScheme,
char *app = getAppForScheme(aScheme);
if (app) {
// Try to only provide the executable name, as it is much simpler than with the path and arguments
char *firstSpace = strchr(app, ' ');
if (firstSpace) {
*firstSpace = '\0';
char *lastSlash = strrchr(app, '/');
if (lastSlash) {
CopyUTF8toUTF16(lastSlash + 1, aDesc);
g_free(app);
return;
}
}
CopyUTF8toUTF16(app, aDesc);
g_free(app);
}