import (
"encoding/binary"
"errors"
+ "io"
"io/fs"
"os"
"path/filepath"
strippedName := strings.ReplaceAll(file.Name(), ".incomplete", "")
strippedName, err = txtEncoder.String(strippedName)
if err != nil {
- return nil, err
+ continue
}
nameSize := make([]byte, 2)
fnwi.name = []byte(strippedName)
- b, err := fnwi.MarshalBinary()
+ b, err := io.ReadAll(&fnwi)
if err != nil {
return nil, err
}