aboutsummaryrefslogtreecommitdiff
path: root/hotline/files.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-04-04 15:37:28 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-04-04 15:47:18 -0700
commit2e1aec0fcfd412cff22cc4fc996973e403589ad8 (patch)
tree6be4564a21229eb9c15602ffdc8e2370b7f72242 /hotline/files.go
parentdd81e2cf8030aaea778677270d2a1b6ed218d6b8 (diff)
Add support for Mac Roman character encoding.
https://en.wikipedia.org/wiki/Mac_OS_Roman
Diffstat (limited to 'hotline/files.go')
-rw-r--r--hotline/files.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/hotline/files.go b/hotline/files.go
index 63fa482..0746b1f 100644
--- a/hotline/files.go
+++ b/hotline/files.go
@@ -118,6 +118,10 @@ func getFileNameList(path string, ignoreList []string) (fields []Field, err erro
}
strippedName := strings.ReplaceAll(file.Name(), ".incomplete", "")
+ strippedName, err = txtEncoder.String(strippedName)
+ if err != nil {
+ return nil, err
+ }
nameSize := make([]byte, 2)
binary.BigEndian.PutUint16(nameSize, uint16(len(strippedName)))