From 51638be41a9b7057e7709a09314539f754e38c66 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Thu, 10 Mar 2022 16:04:49 -0500 Subject: Reset cached mime-type when reading sub-datasources Signed-off-by: Dave Henderson --- data/datasource_file.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'data/datasource_file.go') diff --git a/data/datasource_file.go b/data/datasource_file.go index ce86c0a2..7619f039 100644 --- a/data/datasource_file.go +++ b/data/datasource_file.go @@ -31,6 +31,9 @@ func readFile(ctx context.Context, source *Source, args ...string) ([]byte, erro if parsed.Path != "" { p = filepath.Join(p, parsed.Path) } + + // reset the media type - it may have been set by a parent dir read + source.mediaType = "" } // make sure we can access the file -- cgit v1.2.3