Skip to content

Fix navigate into symlink dir - #27

Merged
kooler merged 2 commits into
kooler:mainfrom
gmist:fix_symlinksdir
Sep 23, 2026
Merged

kooler merged 2 commits into
kooler:mainfrom
gmist:fix_symlinksdir

Conversation

@gmist

@gmist gmist commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Problem: pressing Enter on a symlink to a directory opens it in $EDITOR instead of navigating
into it. This happens because io/fs.DirEntry.IsDir() returns false for symlinks because type is
fs.ModeSymlink, not fs.ModeDir. As a result checks like if e.IsDir() { return m.enterDir() } let symlink-to-dir
entries fall through into the file-open path.

Fix: added IsSymlinkToDir(e fs.DirEntry) bool on panel.Model for checks whether the target symlink to directory. For archives and non-symlinks the method returns false immediately so no extra syscall is incurred.

@kooler

kooler commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Thanks, nice fix!

@kooler
kooler merged commit 4cea7be into kooler:main Sep 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants