mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Fix clang warning
This commit is contained in:
parent
7811518903
commit
36cd5b72a5
25
src/nnn.c
25
src/nnn.c
|
@ -1205,6 +1205,18 @@ static bool xrm(char *path)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void archive_selection(const char *archive, const char *curpath)
|
||||||
|
{
|
||||||
|
snprintf(g_buf, CMD_LEN_MAX,
|
||||||
|
#ifdef __linux__
|
||||||
|
"xargs -0 -a %s %s %s",
|
||||||
|
#else
|
||||||
|
"cat %s | xargs -0 -o %s %s",
|
||||||
|
#endif
|
||||||
|
g_cppath, utils[APACK], archive);
|
||||||
|
spawn("sh", "-c", g_buf, curpath, F_NORMAL | F_SIGINT);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns:
|
* Returns:
|
||||||
* FALSE - a message is shown
|
* FALSE - a message is shown
|
||||||
|
@ -3658,17 +3670,8 @@ nochange:
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r == 's') {
|
r == 's' ? archive_selection(tmp, path)
|
||||||
snprintf(g_buf, CMD_LEN_MAX,
|
: spawn(utils[APACK], tmp, dents[cur].name, path, F_NORMAL);
|
||||||
#ifdef __linux__
|
|
||||||
"xargs -0 -a %s %s %s",
|
|
||||||
#else
|
|
||||||
"cat %s | xargs -0 -o %s %s",
|
|
||||||
#endif
|
|
||||||
g_cppath, utils[APACK], tmp);
|
|
||||||
spawn("sh", "-c", g_buf, path, F_NORMAL | F_SIGINT);
|
|
||||||
} else
|
|
||||||
spawn(utils[APACK], tmp, dents[cur].name, path, F_NORMAL);
|
|
||||||
break;
|
break;
|
||||||
case SEL_OPENWITH:
|
case SEL_OPENWITH:
|
||||||
dir = NULL;
|
dir = NULL;
|
||||||
|
|
Loading…
Reference in a new issue