Merge pull request #1406 from N-R-K/realpath

account for realpath failure and update link
This commit is contained in:
Arun 2022-06-20 21:48:20 +05:30 committed by GitHub
commit c69067b502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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 */