add fixtures, but MatchReader may not work for some msooxml files, 4096 bytes maybe not enough

This commit is contained in:
kumakichi
2018-10-25 17:26:48 +08:00
parent 9f401df51f
commit a98cd2a150
6 changed files with 30 additions and 2 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ func MatchFile(filepath string) (types.Type, error) {
// MatchReader is convenient wrapper to Match() any Reader
func MatchReader(reader io.Reader) (types.Type, error) {
buffer := make([]byte, 512)
buffer := make([]byte, 4096) // just make msooxml test happy, but 4096 bytes maybe not enough to determine the real type
_, err := reader.Read(buffer)
if err != nil && err != io.EOF {