cleanup
This commit is contained in:
1 parent
e532db082f
commit
a717c31ca1
12 files changed
+304
-305
No files matched your search
@@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
type linkState int8
|
||||
type linkState byte
|
||||
|
||||
const (
|
||||
notLink linkState = iota
|
||||
@@ -298,16 +298,12 @@ func (nav *nav) updir() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errNotDir = fmt.Errorf("not a directory")
|
||||
|
||||
func (nav *nav) open() error {
|
||||
curr, err := nav.currFile()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !curr.IsDir() {
|
||||
return errNotDir
|
||||
return fmt.Errorf("open: %s", err)
|
||||
}
|
||||
|
||||
path := curr.Path
|
||||
|
||||
dir := newDir(path)
|
||||
|
||||
Reference in new issue
Block a user