grim/wasdead

81d77ff37d53
Parents eb431873f7e8
Children cce62b26246a
remove the database move hack, it was a hack and a dumb one
  • +1 -14
    run/run.go
  • --- a/run/run.go Sat Sep 26 04:56:45 2020 -0500
    +++ b/run/run.go Sat Sep 26 05:02:37 2020 -0500
    @@ -37,20 +37,7 @@
    if err := database.Open(g.DatabasePath); err != nil {
    log.Errorf("failed to open database: %v", err)
    - bak := fmt.Sprintf("%s.bak", g.DatabasePath)
    - log.Errorf("moving database to %s to attempt to startup", bak)
    -
    - if err := os.Rename(g.DatabasePath, bak); err != nil {
    - log.Errorf("failed to move the database out of the way: %v", err)
    -
    - return err
    - }
    -
    - if err := database.Open(bak); err != nil {
    - log.Errorf("failed to open the database after moving the old copy out of the way: %v", err)
    -
    - return err
    - }
    + return err
    }
    defer database.Close()