diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp index 7882d0150db..4ff8bdb578b 100644 --- a/xpcom/components/nsComponentManager.cpp +++ b/xpcom/components/nsComponentManager.cpp @@ -578,17 +578,9 @@ static nsresult GetLocationFromDirectoryService(const char* prop, if (!directoryService) return NS_ERROR_FAILURE; - nsCOMPtr directory; - nsresult rv = directoryService->Get(prop, NS_GET_IID(nsIFile), - getter_AddRefs(directory)); - if (NS_FAILED(rv)) - return rv; - - rv = directory->Normalize(); - NS_ENSURE_SUCCESS(rv, rv); - - directory.forget(aDirectory); - return NS_OK; + return directoryService->Get(prop, + NS_GET_IID(nsIFile), + (void**)aDirectory); }