mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 22:35:43 +00:00
r=me, sr=jag Due to a bug in OS/2 compiler handling of temporaries in a conditional, we need to split this out. Need this ASAP, Os/2 mail is DOA Incidentally, I'll point out that this code is wrong anyway because different countries write kb in different ways (kb, KB, Kb)
This commit is contained in:
parent
b4421910e1
commit
4defc1ce1a
@ -1948,7 +1948,15 @@ nsMsgFolderDataSource::GetFolderSizeNode(PRInt32 aFolderSize, nsIRDFNode **aNode
|
||||
folderSize /= 1024; // normalize into k;
|
||||
PRBool sizeInMB = (folderSize > 1024);
|
||||
sizeString.AppendInt((sizeInMB) ? folderSize / 1024 : folderSize);
|
||||
sizeString.Append((sizeInMB) ? NS_LITERAL_STRING(" MB") : NS_LITERAL_STRING(" kb"));
|
||||
/* On OS/2, we have an issue where temporaries get destructed in */
|
||||
/* conditionals. Solution is to break it out */
|
||||
nsAutoString units;
|
||||
if (sizeInMB) {
|
||||
units = NS_LITERAL_STRING(" MB");
|
||||
} else {
|
||||
units = NS_LITERAL_STRING(" kb");
|
||||
}
|
||||
sizeString.Append(units);
|
||||
createNode(sizeString.get(), aNode, getRDFService());
|
||||
}
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user