aboutsummaryrefslogtreecommitdiff
path: root/hotline/file_wrapper.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-09 13:56:29 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-06-09 14:05:15 -0700
commit9cf66aeafbcbb9237fedc2efc97cc2856eb60f7f (patch)
treec3139d8af2bd6ae106a1f619cad7d64f2ddea6db /hotline/file_wrapper.go
parentb129b7cbc9fd9a9c11a77e5922861ef08893efa1 (diff)
Convert more bespoke methods to io.Reader/io.Writer interfaces
Diffstat (limited to 'hotline/file_wrapper.go')
-rw-r--r--hotline/file_wrapper.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/hotline/file_wrapper.go b/hotline/file_wrapper.go
index 2c796ca..ec025dc 100644
--- a/hotline/file_wrapper.go
+++ b/hotline/file_wrapper.go
@@ -1,6 +1,7 @@
package hotline
import (
+ "bytes"
"encoding/binary"
"errors"
"fmt"
@@ -243,9 +244,11 @@ func (f *fileWrapper) flattenedFileObject() (*flattenedFileObject, error) {
f.ffo.FlatFileHeader.ForkCount[1] = 3
- if err := f.ffo.FlatFileInformationFork.UnmarshalBinary(b); err != nil {
+ _, err = io.Copy(&f.ffo.FlatFileInformationFork, bytes.NewReader(b))
+ if err != nil {
return nil, err
}
+
} else {
f.ffo.FlatFileInformationFork = FlatFileInformationFork{
Platform: []byte("AMAC"), // TODO: Remove hardcode to support "AWIN" Platform (maybe?)