Do not copy data dir on build. Create data dir if needed on launch

This commit is contained in:
Gabe Kangas
2021-04-11 19:43:29 -07:00
parent 202a6aa2e5
commit 1b27d0b46d
2 changed files with 7 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package main
import (
"flag"
"os"
"strconv"
"time"
@ -56,6 +57,11 @@ func main() {
}
log.Infoln(config.GetReleaseString())
// Create the data directory if needed
if !utils.DoesFileExists("data") {
os.Mkdir("./data", 0700)
}
// Allows a user to restore a specific database backup
if *restoreDatabaseFile != "" {
databaseFile := config.DatabaseFilePath