mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
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:
parent
b3718507bf
commit
b707196872
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user