Skip to content

Commit 30ab35f

Browse files
committed
reader: return Rock Ridge filename if available
1 parent 001bb66 commit 30ab35f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

rockridge.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ func (s SystemUseEntrySlice) GetRockRidgeName() string {
4141
var name string
4242

4343
for _, entry := range s {
44+
// There is a continuation flag in the record, but we determine continuation
45+
// by simply reading all NM entries.
4446
if entry.Type() == "NM" {
4547
nm := umarshalRockRidgeNameEntry(entry)
4648
name += nm.Name
@@ -51,9 +53,6 @@ func (s SystemUseEntrySlice) GetRockRidgeName() string {
5153
}
5254

5355
func umarshalRockRidgeNameEntry(e SystemUseEntry) *RockRidgeNameEntry {
54-
// There is a continuation flag in byte 0, but we determine continuation
55-
// by simply reading all entries.
56-
5756
return &RockRidgeNameEntry{
5857
Flags: e.Data()[0],
5958
Name: string(e.Data()[1:]),

0 commit comments

Comments
 (0)