bug 63025 - remove only consumer of nsSimpleCharString and nsPersistentFileDescriptor from build

r=dougt, sr=shaver
This commit is contained in:
alecf%netscape.com 2002-02-15 00:18:34 +00:00
Родитель 2445d7563e
Коммит 64bd1d857e
1 изменённых файлов: 2 добавлений и 6 удалений

Просмотреть файл

@ -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? if (isOld50) // Some format which was used around M10-M11. Can we forget about it?
{ {
nsAutoString dirNameString;
rv = aRegistry->GetString(profKey, rv = aRegistry->GetString(profKey,
kRegistryDirectoryString.get(), kRegistryDirectoryString.get(),
getter_Copies(regData)); getter_Copies(regData));
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
nsSimpleCharString decodedDirName;
PRBool haveHexBytes = PR_TRUE; PRBool haveHexBytes = PR_TRUE;
// Decode the directory name to return the ordinary string // Decode the directory name to return the ordinary string
nsCAutoString regDataCString; regDataCString.AssignWithConversion(regData); nsCAutoString regDataCString; regDataCString.AssignWithConversion(regData);
nsInputStringStream stream(regDataCString.get()); nsInputStringStream stream(regDataCString.get());
nsPersistentFileDescriptor descriptor;
char bigBuffer[MAX_PERSISTENT_DATA_SIZE + 1]; 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. // 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) if (haveHexBytes)
{ {
PR_sscanf(bigBuffer, "%x", (PRUint32*)&bytesRead); PR_sscanf(bigBuffer, "%x", (PRUint32*)&bytesRead);
@ -1310,10 +1308,8 @@ nsresult ProfileStruct::InternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe
// Make sure we are null terminated // Make sure we are null terminated
bigBuffer[bytesRead]='\0'; bigBuffer[bytesRead]='\0';
descriptor.SetData(bigBuffer, bytesRead);
descriptor.GetData(decodedDirName);
dirNameString.AssignWithConversion(decodedDirName); dirNameString.AssignWithConversion(nsDependentCString(bigBuffer, bytesRead).get());
} }
else else
dirNameString = regData; dirNameString = regData;