aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-08-06 23:26:18 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-08-06 23:27:06 +0530
commit68b460310e181326b1ea6457b26b4153b96c92b1 (patch)
tree161c833a9d74e896f68a19decdd887d6db946c88 /src
parent5651d12dc4928737868444d8012cc5d0a666b228 (diff)
downloadnnn-68b460310e181326b1ea6457b26b4153b96c92b1.tar.gz
Use auto-compress option for bsdtar, tar
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 7a25856..37e8760 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -132,7 +132,7 @@
#define EXEC_ARGS_MAX 8
#define SCROLLOFF 3
#define LONG_SIZE sizeof(ulong)
-#define ARCHIVE_CMD_LEN 12
+#define ARCHIVE_CMD_LEN 16
/* Program return codes */
#define _SUCCESS 0
@@ -1265,11 +1265,11 @@ static void get_archive_cmd(char *cmd, char *archive)
if (getutil(utils[ATOOL]))
xstrlcpy(cmd, "atool -a", ARCHIVE_CMD_LEN);
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"))
xstrlcpy(cmd, "zip -r", ARCHIVE_CMD_LEN);
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)