Skip to content

Commit

Permalink
fix: fix listing catalogue display
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome Le Saux committed Apr 11, 2024
1 parent b3b2e8b commit 295010e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,13 @@ func listDsk(d dsk.DSK, dskPath string) (onError bool, message, hint string) {
for _, i := range d.GetFilesIndices() {
size := fmt.Sprintf("%.3d ko", d.GetFilesize(d.Catalogue[i]))
totalUsed += d.GetFilesize(d.Catalogue[i])
filename := fmt.Sprintf("%s.%s", d.Catalogue[i].Nom, d.Catalogue[i].Ext)
ext := d.Catalogue[i].Ext
for i := range ext {
if ext[i] == 0xA0 {
ext[i] = ' '
}
}
filename := fmt.Sprintf("%s.%s", d.Catalogue[i].Nom, ext)
fmt.Fprintf(os.Stdout, "[%.2d] : %s : %d %s\n", i, filename, int(d.Catalogue[i].User), size)
}
fmt.Fprintf(os.Stdout, "Dsk %.3d Ko used\n", totalUsed)
Expand Down

0 comments on commit 295010e

Please sign in to comment.