Do not open current dir in nez context when extracting archive

This commit is contained in:
Arun Prakash Jana 2021-06-19 13:00:50 +05:30
parent 96cbb4ff84
commit e8f0c53287
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -4291,14 +4291,16 @@ static bool handle_archive(char *fpath /* in-out param */, char op)
printwait(messages[MSG_CANCEL], NULL); printwait(messages[MSG_CANCEL], NULL);
return FALSE; return FALSE;
} }
/* Do not create smart context for current dir */
if (!xmktree(outdir, TRUE) || (chdir(outdir) == -1)) { if (!(*outdir == '.' && outdir[1] == '\0')) {
printwarn(NULL); if (!xmktree(outdir, TRUE) || (chdir(outdir) == -1)) {
return FALSE; printwarn(NULL);
return FALSE;
}
/* Copy the new dir path to open it in smart context */
outdir = realpath(".", NULL);
x_to = TRUE;
} }
/* 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])) {