From eb66cb5d112ce1e982b7725ea9ae2be2bed126b5 Mon Sep 17 00:00:00 2001 From: NRK Date: Mon, 20 Jun 2022 21:49:41 +0600 Subject: [PATCH 1/2] account for realpath failure realpath may fail, in which case fallback to mkpath. --- src/nnn.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/nnn.c b/src/nnn.c index 8b0db0df9..0b749d7b9 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6913,13 +6913,11 @@ static bool browse(char *ipath, const char *session, int pkey) } pent = &pdents[cur]; - if (g_state.selbm) { - S_ISLNK(pent->mode) - ? (realpath(pent->name, newpath) && xstrsncpy(path, lastdir, PATH_MAX)) - : mkpath(path, pent->name, newpath); - g_state.selbm = 0; - } else + if (!g_state.selbm || !(S_ISLNK(pent->mode) && + realpath(pent->name, newpath) && + xstrsncpy(path, lastdir, PATH_MAX))) mkpath(path, pent->name, newpath); + g_state.selbm = 0; DPRINTF_S(newpath); /* Visit directory */ From af5cdca043e8d2a10ffcef3a9bf70a784b14c642 Mon Sep 17 00:00:00 2001 From: NRK Date: Mon, 20 Jun 2022 22:06:23 +0600 Subject: [PATCH 2/2] README: update my name and link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00ab86b80..5b9b759f1 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ Don't memorize! Arrows, /, q suffice. Tab creat - [KlzXS](https://github.com/KlzXS) - [Léo Villeveygoux](https://github.com/leovilok) - [Luuk van Baal](https://github.com/luukvbaal) -- [N-R-K](https://github.com/N-R-K) +- [NRK](https://codeberg.org/NRK) - [Sijmen J. Mulder](https://github.com/sjmulder) - and other contributors