mirror of
https://github.com/jarun/nnn.git
synced 2024-11-18 00:49:15 +00:00
Merge pull request #1406 from N-R-K/realpath
account for realpath failure and update link
This commit is contained in:
commit
c69067b502
|
@ -156,7 +156,7 @@ Don't memorize! Arrows, <kbd>/</kbd>, <kbd>q</kbd> suffice. <kbd>Tab</kbd> 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
|
||||
|
||||
|
|
10
src/nnn.c
10
src/nnn.c
|
@ -6913,13 +6913,11 @@ nochange:
|
|||
}
|
||||
|
||||
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 */
|
||||
|
|
Loading…
Reference in a new issue