handle broken links with 'select' command

Related #201
This commit is contained in:
Gokcehan committed 2020-07-20 02:15:30 +03:00
1 parent 6d1a840587
commit 7174b7e307
4 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -152,10 +152,10 @@ func (app *app) loop() {
if gSelect != "" {
go func() {
stat, err := os.Stat(gSelect)
lstat, err := os.Lstat(gSelect)
if err != nil {
app.ui.exprChan <- &callExpr{"echoerr", []string{err.Error()}, 1}
} else if stat.IsDir() {
} else if lstat.IsDir() {
app.ui.exprChan <- &callExpr{"cd", []string{gSelect}, 1}
} else {
app.ui.exprChan <- &callExpr{"select", []string{gSelect}, 1}