package[_repo]: Print version correctly
Use BPackageVersion::ToString() instead of assembling the version string manually. This fixes the incorrect pre-release separator.
This commit is contained in:
parent
ea8b5c257d
commit
b50e5e3307
@ -265,15 +265,7 @@ private:
|
||||
|
||||
static void _PrintPackageVersion(const BPackageVersionData& version)
|
||||
{
|
||||
printf("%s", version.major);
|
||||
if (version.minor != NULL && version.minor[0] != '\0')
|
||||
printf(".%s", version.minor);
|
||||
if (version.micro != NULL && version.micro[0] != '\0')
|
||||
printf(".%s", version.micro);
|
||||
if (version.preRelease != NULL && version.preRelease[0] != '\0')
|
||||
printf("-%s", version.preRelease);
|
||||
if (version.revision > 0)
|
||||
printf("-%" B_PRIu32, version.revision);
|
||||
printf("%s", BPackageVersion(version).ToString().String());
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -231,15 +231,7 @@ struct RepositoryContentListHandler : BRepositoryContentHandler {
|
||||
private:
|
||||
static void _PrintPackageVersion(const BPackageVersionData& version)
|
||||
{
|
||||
printf("%s", version.major);
|
||||
if (version.minor != NULL && version.minor[0] != '\0')
|
||||
printf(".%s", version.minor);
|
||||
if (version.micro != NULL && version.micro[0] != '\0')
|
||||
printf(".%s", version.micro);
|
||||
if (version.preRelease != NULL && version.preRelease[0] != '\0')
|
||||
printf("-%s", version.preRelease);
|
||||
if (version.revision > 0)
|
||||
printf("-%" B_PRIu32, version.revision);
|
||||
printf("%s", BPackageVersion(version).ToString().String());
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user