Bug 791694 - Use XRE_EXECUTABLE_FILE in browser shell instead of guesswork from NS_XPCOM_CURRENT_PROCESS_DIR and MOZ_APP_NAME. r=jimm

This commit is contained in:
Mike Hommey
2012-12-14 08:32:54 +01:00
parent b0cdbdbf89
commit 4f35d40614
2 changed files with 5 additions and 6 deletions

View File

@@ -26,6 +26,7 @@
#include "nsIWinTaskbar.h"
#include "nsISupportsPrimitives.h"
#include "nsThreadUtils.h"
#include "nsXULAppAPI.h"
#include "windows.h"
#include "shellapi.h"
@@ -198,12 +199,12 @@ GetHelperPath(nsAutoString& aPath)
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIFile> appHelper;
rv = directoryService->Get(NS_XPCOM_CURRENT_PROCESS_DIR,
rv = directoryService->Get(XRE_EXECUTABLE_FILE,
NS_GET_IID(nsIFile),
getter_AddRefs(appHelper));
NS_ENSURE_SUCCESS(rv, rv);
rv = appHelper->AppendNative(NS_LITERAL_CSTRING("uninstall"));
rv = appHelper->SetNativeLeafName(NS_LITERAL_CSTRING("uninstall"));
NS_ENSURE_SUCCESS(rv, rv);
rv = appHelper->AppendNative(NS_LITERAL_CSTRING("helper.exe"));