This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository edi.

View the commit online.

commit 7bbf745cab0c17185a86f09b53be9221c7e1dfb7
Author: Alastair Poole <[email protected]>
AuthorDate: Tue Apr 14 11:44:54 2026 +0100

    mime: handle missing mimetypes better.
    
    Nuking efreet cache causes problems. Not common but worth
    fixing as the application will segfault.
---
 src/bin/edi_main.c | 2 +-
 src/lib/edi_mime.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c
index 84d2059..9426c53 100644
--- a/src/bin/edi_main.c
+++ b/src/bin/edi_main.c
@@ -2051,7 +2051,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
           }
 
         mime = edi_mime_type_get(project_path);
-        if (!edi_content_provider_for_mime_get(mime))
+        if ((mime) && (!edi_content_provider_for_mime_get(mime)))
           {
              fprintf(stderr, _("Could not open file of unsupported mime type (%s)\n"), mime);
              goto end;
diff --git a/src/lib/edi_mime.c b/src/lib/edi_mime.c
index 20d5b9d..85e14f3 100644
--- a/src/lib/edi_mime.c
+++ b/src/lib/edi_mime.c
@@ -54,8 +54,10 @@ edi_mime_type_get(const char *path)
    eina_file_close(f);
 
    mime = efreet_mime_type_get(path);
+   if ((!mime) && (likely_text)) return "text/plain";
+   if (!mime) return NULL;
    if (!strcmp(mime, "application/x-shellscript")) return mime;
-   if ((mime) && (strncmp(mime, "text/", 5)) && (likely_text))
+   if ((strncmp(mime, "text/", 5)) && (likely_text))
      {
         return "text/plain";
      }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to