Replace 'human-readable' flag with 'show-bytes'

This commit is contained in:
2026-02-05 18:02:02 +02:00
parent f6aa01339e
commit 3a7adb27ab
2 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -321,7 +321,7 @@ func (entry *BPMDatabaseEntry) GetEntryOptionalDependants() (dependants []string
return dependants
}
func (entry *BPMDatabaseEntry) CreateReadableInfo(rootDir string, humanReadableSize bool) string {
func (entry *BPMDatabaseEntry) CreateReadableInfo(rootDir string, showBytes bool) string {
builder := strings.Builder{}
builderWriteStringNotEmpty := func(label string, value string) {
if value != "" {
@@ -457,10 +457,10 @@ func (entry *BPMDatabaseEntry) CreateReadableInfo(rootDir string, humanReadableS
if entry.Info.Type == "binary" {
installedSize := entry.InstalledSize
var installedSizeStr string
if humanReadableSize {
installedSizeStr = BytesToHumanReadable(installedSize)
} else {
if showBytes {
installedSizeStr = strconv.FormatInt(installedSize, 10)
} else {
installedSizeStr = BytesToHumanReadable(installedSize)
}
builder.WriteString("Installed size: " + installedSizeStr + "\n")
}