From e92b523976512308bf9acaf71782cf6f9b57b0fb Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 17 Apr 2020 08:53:44 +0530 Subject: [PATCH] Fix #523: create NNN_PIPE early --- src/nnn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nnn.c b/src/nnn.c index b6bb768d..e9f70553 100644 --- 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;