зеркало из https://github.com/mozilla/gecko-dev.git
Fixing LL_ compare routines.
This commit is contained in:
Родитель
b450a10c7a
Коммит
41333e2a6c
|
@ -682,15 +682,18 @@ nsPrefMigration::GetDriveName(nsFileSpec inputPath, char* driveName)
|
||||||
* RETURNS: NS_OK if enough space is available
|
* RETURNS: NS_OK if enough space is available
|
||||||
* NS_ERROR_FAILURE if there is not enough space
|
* NS_ERROR_FAILURE if there is not enough space
|
||||||
*
|
*
|
||||||
|
* Todo: you may want to change this proto from a float to a int64.
|
||||||
*--------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------*/
|
||||||
nsresult
|
nsresult
|
||||||
nsPrefMigration::CheckForSpace(nsFileSpec newProfilePath, PRFloat64 requiredSpace)
|
nsPrefMigration::CheckForSpace(nsFileSpec newProfilePath, PRFloat64 requiredSpace)
|
||||||
{
|
{
|
||||||
// nsFileSpec drive(newProfilePath);
|
nsFileSpec drive(newProfilePath);
|
||||||
// EVIL! the mac does not like this, but it needs to!
|
PRInt64 availSpace = newProfilePath.GetDiskSpaceAvailable();
|
||||||
// if (LL_CMP(newProfilePath.GetDiskSpaceAvailable(), <, requiredSpace))
|
PRInt64 require64;
|
||||||
// return NS_ERROR_FAILURE;
|
|
||||||
|
LL_F2L(require64, requiredSpace);
|
||||||
|
if (LL_CMP(availSpace, <, require64))
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче