From 1141e1d4afb01b5360e2a344b422d84d31563adf Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 5 Feb 2020 13:22:01 -0500 Subject: Update search pattern due to file-5.38 changes --- src/mime.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mime.c b/src/mime.c index 95b5660..d5912d4 100644 --- a/src/mime.c +++ b/src/mime.c @@ -132,10 +132,12 @@ int file_is_binexec(const char *filename) { int result = 0; char *path = normpath(filename); Mime *type = file_mimetype(path); - if (fnmatch("application/*executable", type->type, FNM_PATHNAME) != FNM_NOMATCH && strcmp(type->charset, "binary") == 0) { + // file-5.38: changed mime name associated with executables + // TODO: implement compatibility function to return the correct search pattern + if (fnmatch("application/x-[sh|ex]*", type->type, FNM_PATHNAME) != FNM_NOMATCH && strcmp(type->charset, "binary") == 0) { result = 1; } free(path); mime_free(type); return result; -} \ No newline at end of file +} -- cgit