handle the case of single nonbolt file
This commit is contained in:
parent
ae584be0b8
commit
e10337092f
@ -32,7 +32,6 @@ func main() {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
defer termbox.Close()
|
defer termbox.Close()
|
||||||
|
|
||||||
style := defaultStyle()
|
style := defaultStyle()
|
||||||
termbox.SetOutputMode(termbox.Output256)
|
termbox.SetOutputMode(termbox.Output256)
|
||||||
|
|
||||||
@ -41,8 +40,14 @@ func main() {
|
|||||||
currentFilename = databaseFile
|
currentFilename = databaseFile
|
||||||
db, err = bolt.Open(databaseFile, 0600, nil)
|
db, err = bolt.Open(databaseFile, 0600, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
mainLoop(nil, style)
|
if len(databaseFiles) > 1 {
|
||||||
continue
|
mainLoop(nil, style)
|
||||||
|
continue
|
||||||
|
} else {
|
||||||
|
termbox.Close()
|
||||||
|
fmt.Printf("Error reading file: %q\n", err.Error())
|
||||||
|
os.Exit(111)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// First things first, load the database into memory
|
// First things first, load the database into memory
|
||||||
|
Loading…
Reference in New Issue
Block a user