summaryrefslogtreecommitdiff
path: root/data/datasource_file.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2022-03-10 16:04:49 -0500
committerDave Henderson <dhenderson@gmail.com>2022-03-10 18:57:12 -0500
commit51638be41a9b7057e7709a09314539f754e38c66 (patch)
tree78da4a4f385af50b7c2ca77dee1a4c4cc9de7687 /data/datasource_file.go
parent694cc3c474be065632530eef500ee7c91d55b79b (diff)
Reset cached mime-type when reading sub-datasources
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'data/datasource_file.go')
-rw-r--r--data/datasource_file.go3
1 files changed, 3 insertions, 0 deletions
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