Skip to content

Commit

Permalink
for lowercase instead of uppercase names
Browse files Browse the repository at this point in the history
This will match the behavior of Linux kernel's isofs code.
  • Loading branch information
kdomanski committed Apr 28, 2020
1 parent 4e37820 commit 00eb28a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions image_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ func splitPath(input string) []string {

// See ECMA-119 7.5
func mangleFileName(input string) string {
input = strings.ToUpper(input)
// https://github.com/torvalds/linux/blob/v5.6/fs/isofs/dir.c#L29
input = strings.ToLower(input)
split := strings.Split(input, ".")

version := "1"
Expand Down Expand Up @@ -140,7 +141,8 @@ func mangleDirectoryName(input string) string {
}

func mangleD1String(input string, maxCharacters int) string {
input = strings.ToUpper(input)
// https://github.com/torvalds/linux/blob/v5.6/fs/isofs/dir.c#L29
input = strings.ToLower(input)

var mangledString string
for i := 0; i < len(input) && i < maxCharacters; i++ {
Expand Down

0 comments on commit 00eb28a

Please sign in to comment.