handle dir symlinks in preview and open

This commit is contained in:
Gokcehan committed 2016-08-14 15:15:54 +03:00
1 parent 84cf8e12c3
commit 6a2bdf472b
3 files changed
+27 -9

No files matched your search

+6 -2
View File
@@ -289,10 +289,14 @@ func (nav *Nav) updir() error {
}
func (nav *Nav) open() error {
curr := nav.currFile()
path := nav.currPath()
if curr.IsDir() {
f, err := os.Stat(path)
if err != nil {
return fmt.Errorf("open: %s", err)
}
if f.IsDir() {
dir := newDir(path)
dir.load(nav.inds[path], nav.poss[path], nav.height, nav.names[path])