Skip to content

Commit

Permalink
Fix file argument (jonas#788)
Browse files Browse the repository at this point in the history
file -I works with macOS but not with Linux (should be file -i). Rather use the long option --mime which is valid for both.
  • Loading branch information
koutcher authored and rolandwalker committed May 21, 2018
1 parent 1e80715 commit 3215532
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ get_path_encoding(const char *path, struct encoding *default_encoding)
|| !strcmp(encoding, "unspecified")
|| !strcmp(encoding, "set")) {
const char *file_argv[] = {
"file", "-I", "--", path, NULL
"file", "--mime", "--", path, NULL
};

if (!*path || !io_run_buf(file_argv, buf, sizeof(buf), NULL, false)
Expand Down

0 comments on commit 3215532

Please sign in to comment.