When handling bookmark, use readlink, not realpath

This is to cd to path as it pointed by symlink, not to it's real path. Bookmarked directory may itself contain symlinks in path, which should be respected.
This commit is contained in:
me 2023-11-21 20:17:53 +03:00
parent 485079d3ec
commit 6027e32cec
1 changed files with 1 additions and 1 deletions

View File

@ -7053,7 +7053,7 @@ nochange:
pent = &pdents[cur];
if (!g_state.selbm || !(S_ISLNK(pent->mode) &&
realpath(pent->name, newpath) &&
readlink(pent->name, newpath, PATH_MAX) &&
xstrsncpy(path, lastdir, PATH_MAX)))
mkpath(path, pent->name, newpath);
g_state.selbm = 0;