From 72c28938c6002f1b4033122e4ceff5085bbf1f57 Mon Sep 17 00:00:00 2001 From: Al Poole Date: Sun, 21 May 2017 23:22:36 +0100 Subject: [PATCH] provider: add fallback for text-based mimetypes. Reviewers: ajwillia.ms Reviewed By: ajwillia.ms Differential Revision: https://phab.enlightenment.org/D4892 --- src/bin/edi_content_provider.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bin/edi_content_provider.c b/src/bin/edi_content_provider.c index 517df92..8869fbe 100644 --- a/src/bin/edi_content_provider.c +++ b/src/bin/edi_content_provider.c @@ -90,9 +90,13 @@ Edi_Content_Provider *edi_content_provider_for_mime_get(const char *mime) else { id = _edi_config_mime_search(mime); - if (!id) - return NULL; + { + if (!strncasecmp(mime, "text/", 5)) + id = "text"; + else + return NULL; + } } return edi_content_provider_for_id_get(id);