BPackageInfo: Add CanonicalFileName()
The name of the package file is not part of the package-info. CanonicalFileName() constructs the name the file should have (not enforced anywhere (yet)).
This commit is contained in:
parent
a3b1c7b96e
commit
be8f5e00f1
@ -89,6 +89,8 @@ public:
|
||||
FreshensList() const;
|
||||
const BStringList& ReplacesList() const;
|
||||
|
||||
BString CanonicalFileName() const;
|
||||
|
||||
void SetName(const BString& name);
|
||||
void SetSummary(const BString& summary);
|
||||
void SetDescription(const BString& description);
|
||||
|
@ -1590,6 +1590,17 @@ BPackageInfo::ReplacesList() const
|
||||
}
|
||||
|
||||
|
||||
BString
|
||||
BPackageInfo::CanonicalFileName() const
|
||||
{
|
||||
if (InitCheck() != B_OK)
|
||||
return BString();
|
||||
|
||||
return BString().SetToFormat("%s-%s-%s.hpkg", fName.String(),
|
||||
fVersion.ToString().String(), kArchitectureNames[fArchitecture]);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BPackageInfo::SetName(const BString& name)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user