瀏覽代碼

Use the -I option on OS X to identify file mime

master
Arun Prakash Jana 6 年之前
父節點
當前提交
8aa72a40a3
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 8 行新增1 行删除
  1. +8
    -1
      src/nnn.c

+ 8
- 1
src/nnn.c 查看文件

@@ -331,6 +331,13 @@ static struct timespec gtimeout;
#define REPLACE_STR 'I'
#endif

/* Options to identify file mime */
#ifdef __APPLE__
#define FILE_OPTS "-bI"
#else
#define FILE_OPTS "-bi"
#endif

/* Macros for utilities */
#define MEDIAINFO 0
#define EXIFTOOL 1
@@ -2657,7 +2664,7 @@ nochange:
/* Recognize and open plain
* text files with vi
*/
if (get_output(g_buf, MAX_CMD_LEN, "file", "-bi", newpath, 0) == NULL)
if (get_output(g_buf, MAX_CMD_LEN, "file", FILE_OPTS, newpath, 0) == NULL)
continue;

if (strstr(g_buf, "text/") == g_buf) {


||||||
x
 
000:0
Loading…
取消
儲存