From: Arun Prakash Jana Date: Wed, 20 May 2020 13:16:12 +0000 (+0530) Subject: Fix #582 X-Git-Tag: v3.2~11 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=9e41c39138325f1545fa674d294de29660a6105c;p=nnn.git Fix #582 --- diff --git a/src/nnn.c b/src/nnn.c index 8d6db369..508fe12e 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4731,17 +4731,15 @@ static void notify_fifo() } } - static char *name = NULL; - static time_t t = {0}; + static struct entry lastentry = {0}; - if (dents[cur].name == name && dents[cur].t == t) + if (!memcmp(&lastentry, &dents[cur], sizeof(struct entry))) return; - name = dents[cur].name; - t = dents[cur].t; + lastentry = dents[cur]; char path[PATH_MAX]; - size_t len = mkpath(g_ctx[cfg.curctx].c_path, ndents ? name : "", path); + size_t len = mkpath(g_ctx[cfg.curctx].c_path, ndents ? dents[cur].name : "", path); path[len - 1] = '\n';