allow creation of fresh children db on init

This commit is contained in:
Stephen McQuay 2015-08-09 16:28:40 -07:00
parent f0a462447b
commit 82def358d5

View File

@ -92,11 +92,9 @@ func main() {
case "add": case "add":
dbfile := os.Args[3] dbfile := os.Args[3]
names := os.Args[4:] names := os.Args[4:]
db, err := children.Load(dbfile)
if err != nil { // ignore if file wasn't there to begin with
fmt.Fprintf(os.Stderr, "problem loading children db: %s\n", pwUsage) db, _ := children.Load(dbfile)
os.Exit(1)
}
for _, name := range names { for _, name := range names {
db[name] = 0 db[name] = 0
} }