diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-05 13:22:01 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-05 13:22:01 -0500 |
commit | 1141e1d4afb01b5360e2a344b422d84d31563adf (patch) | |
tree | 6e1d3a9cd26024cea55fee1c17ba7865e01d3348 /src | |
parent | df4dcac273e788fae6f9e964b8954a2729ebcc26 (diff) | |
download | spmc-1141e1d4afb01b5360e2a344b422d84d31563adf.tar.gz |
Update search pattern due to file-5.38 changes
Diffstat (limited to 'src')
-rw-r--r-- | src/mime.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 +} |