mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Fix #1076: show file name in archive extract prompt
This commit is contained in:
parent
35aa864554
commit
96cbb4ff84
20
src/nnn.c
20
src/nnn.c
|
@ -4286,15 +4286,19 @@ static bool handle_archive(char *fpath /* in-out param */, char op)
|
||||||
bool x_to = FALSE;
|
bool x_to = FALSE;
|
||||||
|
|
||||||
if (op == 'x') {
|
if (op == 'x') {
|
||||||
outdir = xreadline(NULL, messages[MSG_NEW_PATH]);
|
outdir = xreadline(xbasename(fpath), messages[MSG_NEW_PATH]);
|
||||||
if (outdir && *outdir && !(*outdir == '.' && outdir[1] == '\0')) {
|
if (!outdir || !*outdir) { /* Cancelled */
|
||||||
if (!xmktree(outdir, TRUE) || (chdir(outdir) == -1)) {
|
printwait(messages[MSG_CANCEL], NULL);
|
||||||
printwarn(NULL);
|
return FALSE;
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
outdir = realpath(".", NULL);
|
|
||||||
x_to = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!xmktree(outdir, TRUE) || (chdir(outdir) == -1)) {
|
||||||
|
printwarn(NULL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
/* Copy the new dir path to open it in smart context */
|
||||||
|
outdir = realpath(".", NULL);
|
||||||
|
x_to = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getutil(utils[UTIL_ATOOL])) {
|
if (getutil(utils[UTIL_ATOOL])) {
|
||||||
|
|
Loading…
Reference in a new issue