X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/a8e89ca4e65f5db3ee6061ede68aade814b4d75c..9cf66aeafbcbb9237fedc2efc97cc2856eb60f7f:/hotline/file_wrapper.go 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?)