X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/5433ca327290cc235c1524a4e64b32a4b45f6d99..9ebf276dbdf3ecae5bdf478ec91efcefc22d6ee3:/hotline/flattened_file_object.go diff --git a/hotline/flattened_file_object.go b/hotline/flattened_file_object.go index 0a14df0..fae8ab8 100644 --- a/hotline/flattened_file_object.go +++ b/hotline/flattened_file_object.go @@ -67,8 +67,8 @@ func NewFlatFileInformationFork(fileName string, modifyTime []byte) FlatFileInfo ModifyDate: modifyTime, NameScript: make([]byte, 2), // TODO: What is this? Name: []byte(fileName), - CommentSize: []byte{0, 4}, - Comment: []byte("TODO"), // TODO: implement (maybe?) + CommentSize: []byte{0, 0}, + Comment: []byte{}, // TODO: implement (maybe?) } } @@ -77,7 +77,7 @@ func NewFlatFileInformationFork(fileName string, modifyTime []byte) FlatFileInfo func (ffif FlatFileInformationFork) DataSize() []byte { size := make([]byte, 4) - //TODO: Can I do math directly on two byte slices? + // TODO: Can I do math directly on two byte slices? dataSize := len(ffif.Name) + len(ffif.Comment) + 74 binary.BigEndian.PutUint32(size, uint32(dataSize)) @@ -124,8 +124,8 @@ func ReadFlattenedFileObject(bytes []byte) flattenedFileObject { comment := bytes[commentStartPos:commentEndPos] - //dataSizeField := bytes[nameEnd+14+commentLen : nameEnd+18+commentLen] - //dataSize := binary.BigEndian.Uint32(dataSizeField) + // dataSizeField := bytes[nameEnd+14+commentLen : nameEnd+18+commentLen] + // dataSize := binary.BigEndian.Uint32(dataSizeField) ffo := flattenedFileObject{ FlatFileHeader: NewFlatFileHeader(),