]> Sergey Matveev's repositories - nnn.git/commitdiff
Skip redundant getutil() call
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 11 Jun 2022 16:02:16 +0000 (21:32 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 11 Jun 2022 16:02:16 +0000 (21:32 +0530)
src/nnn.c

index a5dfb54703d4b3c932854f8b8992dc8645eb0bd9..df3264306644195e6aed2fa7e63e045e6e05a492 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4643,10 +4643,10 @@ static bool handle_archive(char *fpath /* in-out param */, char op)
        char *util, *outdir = NULL;
        bool x_to = FALSE;
        bool is_bsdtar = getutil(utils[UTIL_BSDTAR]);
-       bool is_atool = getutil(utils[UTIL_ATOOL]);
+       bool is_atool = !is_bsdtar && getutil(utils[UTIL_ATOOL]);
 
        if (op == 'x') {
-               outdir = xreadline((!is_bsdtar && is_atool) ? "." : xbasename(fpath), messages[MSG_NEW_PATH]);
+               outdir = xreadline(is_atool ? "." : xbasename(fpath), messages[MSG_NEW_PATH]);
                if (!outdir || !*outdir) { /* Cancelled */
                        printwait(messages[MSG_CANCEL], NULL);
                        return FALSE;