aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-17 08:53:44 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-17 08:54:50 +0530
commite92b523976512308bf9acaf71782cf6f9b57b0fb (patch)
tree28518da9869f4f9d5e5d30ca94f017e5d4e065a5 /src
parent7cc46510e3656416ecdf2746a83bd081f0ebddf3 (diff)
downloadnnn-e92b523976512308bf9acaf71782cf6f9b57b0fb.tar.gz
Fix #523: create NNN_PIPE early
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index b6bb768..e9f7055 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;