瀏覽代碼

Use auto-compress option for bsdtar, tar

master
Arun Prakash Jana 6 年之前
父節點
當前提交
68b460310e
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      src/nnn.c

+ 3
- 3
src/nnn.c 查看文件

@@ -132,7 +132,7 @@
#define EXEC_ARGS_MAX 8 #define EXEC_ARGS_MAX 8
#define SCROLLOFF 3 #define SCROLLOFF 3
#define LONG_SIZE sizeof(ulong) #define LONG_SIZE sizeof(ulong)
#define ARCHIVE_CMD_LEN 12
#define ARCHIVE_CMD_LEN 16


/* Program return codes */ /* Program return codes */
#define _SUCCESS 0 #define _SUCCESS 0
@@ -1265,11 +1265,11 @@ static void get_archive_cmd(char *cmd, char *archive)
if (getutil(utils[ATOOL])) if (getutil(utils[ATOOL]))
xstrlcpy(cmd, "atool -a", ARCHIVE_CMD_LEN); xstrlcpy(cmd, "atool -a", ARCHIVE_CMD_LEN);
else if (getutil(utils[BSDTAR])) else if (getutil(utils[BSDTAR]))
xstrlcpy(cmd, "bsdtar -cvf", ARCHIVE_CMD_LEN);
xstrlcpy(cmd, "bsdtar -acvf", ARCHIVE_CMD_LEN);
else if (is_suffix(archive, ".zip")) else if (is_suffix(archive, ".zip"))
xstrlcpy(cmd, "zip -r", ARCHIVE_CMD_LEN); xstrlcpy(cmd, "zip -r", ARCHIVE_CMD_LEN);
else else
xstrlcpy(cmd, "tar -cvf", ARCHIVE_CMD_LEN);
xstrlcpy(cmd, "tar -acvf", ARCHIVE_CMD_LEN);
} }


static void archive_selection(const char *cmd, const char *archive, const char *curpath) static void archive_selection(const char *cmd, const char *archive, const char *curpath)


Loading…
取消
儲存