From 64bd1d857e861ef94ec4a2f7679b42d11d81b0ab Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Fri, 15 Feb 2002 00:18:34 +0000 Subject: [PATCH] bug 63025 - remove only consumer of nsSimpleCharString and nsPersistentFileDescriptor from build r=dougt, sr=shaver --- profile/src/nsProfileAccess.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/profile/src/nsProfileAccess.cpp b/profile/src/nsProfileAccess.cpp index f305da59e874..577afa1c27d8 100644 --- a/profile/src/nsProfileAccess.cpp +++ b/profile/src/nsProfileAccess.cpp @@ -1255,20 +1255,17 @@ nsresult ProfileStruct::InternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe if (isOld50) // Some format which was used around M10-M11. Can we forget about it? { - nsAutoString dirNameString; rv = aRegistry->GetString(profKey, kRegistryDirectoryString.get(), getter_Copies(regData)); if (NS_FAILED(rv)) return rv; - nsSimpleCharString decodedDirName; PRBool haveHexBytes = PR_TRUE; // Decode the directory name to return the ordinary string nsCAutoString regDataCString; regDataCString.AssignWithConversion(regData); nsInputStringStream stream(regDataCString.get()); - nsPersistentFileDescriptor descriptor; char bigBuffer[MAX_PERSISTENT_DATA_SIZE + 1]; // The first 8 bytes of the data should be a hex version of the data size to follow. @@ -1292,6 +1289,7 @@ nsresult ProfileStruct::InternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe } } + nsAutoString dirNameString; if (haveHexBytes) { PR_sscanf(bigBuffer, "%x", (PRUint32*)&bytesRead); @@ -1310,10 +1308,8 @@ nsresult ProfileStruct::InternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe // Make sure we are null terminated bigBuffer[bytesRead]='\0'; - descriptor.SetData(bigBuffer, bytesRead); - descriptor.GetData(decodedDirName); - dirNameString.AssignWithConversion(decodedDirName); + dirNameString.AssignWithConversion(nsDependentCString(bigBuffer, bytesRead).get()); } else dirNameString = regData;