]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix #523: create NNN_PIPE early
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 17 Apr 2020 03:23:44 +0000 (08:53 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 17 Apr 2020 03:24:50 +0000 (08:54 +0530)
src/nnn.c

index b6bb768d525066ecdd348e4988324e1cd0f14458..e9f70553f42cd1e830eeb8e60cf8d6537b96e23a 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4179,14 +4179,14 @@ static bool run_selected_plugin(char **path, const char *file, char *runfile, ch
        int fd;
        size_t len;
 
-       if (*file == '_')
-               return run_cmd_as_plugin(*path, file, runfile);
-
        if (!(g_states & STATE_PLUGIN_INIT)) {
                plctrl_init();
                g_states |= STATE_PLUGIN_INIT;
        }
 
+       if (*file == '_')
+               return run_cmd_as_plugin(*path, file, runfile);
+
        fd = open(g_pipepath, O_RDONLY | O_NONBLOCK);
        if (fd == -1)
                return FALSE;