From 0a22e7c5c8d68eebd0ce0f52a92ced1bc53d7ff4 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Fri, 17 Jul 2020 00:33:37 +0300 Subject: [PATCH] check reg and dir while loading --- nav.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nav.go b/nav.go index ca00f84..3a1d3c8 100644 --- a/nav.go +++ b/nav.go @@ -297,6 +297,8 @@ func (nav *nav) loadDir(path string) *dir { return d } + nav.checkDir(d) + return d } @@ -477,6 +479,8 @@ func (nav *nav) loadReg(path string) *reg { return r } + nav.checkReg(r) + return r } @@ -867,8 +871,6 @@ func (nav *nav) rename() error { dir.files = append(dir.files, &file{FileInfo: lstat}) dir.sel(lstat.Name(), nav.height) - nav.checkDir(dir) - return nil }