Backed out changeset a888f210af4e (bug 735713) because of test failures on Windows

--HG--
extra : rebase_source : eb2c30597bd72049b57e3aed4a496e007d322d03
This commit is contained in:
Ehsan Akhgari 2012-03-14 17:45:18 -04:00
Родитель ff9ea92a21
Коммит 39c744816c
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -221,9 +221,9 @@ ArchiveReader::VerifyProductInformation(const char *MARChannelID,
if (rv == OK) {
/* Compare both versions to ensure we don't have a downgrade
-1 if appVersion is older than productInfoBlock.productVersion
1 if appVersion is newer than productInfoBlock.productVersion
0 if appVersion is the same as productInfoBlock.productVersion
1 if appVersion is older than productInfoBlock.productVersion
-1 if appVersion is newer than productInfoBlock.productVersion
0 if appVersion is the same as productInfoBlock.productVersion
This even works with strings like:
- 12.0a1 being older than 12.0a2
- 12.0a2 being older than 12.0b1
@ -231,7 +231,7 @@ ArchiveReader::VerifyProductInformation(const char *MARChannelID,
- 12.0 being older than 12.1a1 */
int versionCompareResult =
NS_CompareVersions(appVersion, productInfoBlock.productVersion);
if (1 == versionCompareResult) {
if (-1 == versionCompareResult) {
rv = VERSION_DOWNGRADE_ERROR;
}
}