From 1f2aec6d7d3c4cbdc50cdcd284a035f76585f22d Mon Sep 17 00:00:00 2001 From: "seawood%netscape.com" Date: Fri, 10 Jan 2003 08:32:46 +0000 Subject: [PATCH] Fix IRIX bustage. Thanks to Doug Turner for the patch. Bug #185681 r=cls git-svn-id: svn://10.0.0.236/trunk@136151 18797224-902f-48f8-a5cc-f745e15eee43 --- .../glue/standalone/nsGREDirServiceProvider.cpp | 13 +++++++++---- .../xpcom/glue/standalone/nsGREDirServiceProvider.h | 1 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.cpp b/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.cpp index 0e00aeb3000..ef18842599e 100644 --- a/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.cpp +++ b/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.cpp @@ -36,7 +36,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsGREDirServiceProvider.h" - +#include "nsEmbedString.h" #include "nsXPCOMPrivate.h" #include "nspr.h" @@ -99,8 +99,11 @@ nsGREDirServiceProvider::GetFile(const char *prop, PRBool *persistant, nsIFile * else if(strcmp(prop, NS_GRE_COMPONENT_DIR) == 0) { rv = GetGreDirectory(getter_AddRefs(localFile)); - if(NS_SUCCEEDED(rv)) - rv = localFile->AppendRelativeNativePath(NS_LITERAL_CSTRING("components")); + if(NS_SUCCEEDED(rv)) { + nsEmbedCString leaf; + leaf.Assign("components"); + rv = localFile->AppendRelativeNativePath(leaf); + } } if(!localFile || NS_FAILED(rv)) @@ -231,7 +234,9 @@ nsGREDirServiceProvider::GetGreDirectory(nsILocalFile **aLocalFile) char *pGreDir = GetGREDirectoryPath(); if(pGreDir) { nsCOMPtr tempLocal; - rv = NS_NewNativeLocalFile(nsDependentCString(pGreDir), PR_TRUE, getter_AddRefs(tempLocal)); + nsEmbedCString leaf; + leaf.Assign(pGreDir); + rv = NS_NewNativeLocalFile(leaf, PR_TRUE, getter_AddRefs(tempLocal)); if (NS_SUCCEEDED(rv)) { *aLocalFile = tempLocal; diff --git a/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.h b/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.h index a48d28c8bc9..a8122524a32 100644 --- a/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.h +++ b/mozilla/xpcom/glue/standalone/nsGREDirServiceProvider.h @@ -41,7 +41,6 @@ #include "nsILocalFile.h" #include "nsIDirectoryService.h" #include "nsDirectoryServiceDefs.h" -#include "nsString.h" class nsIFile;