Skip to content

Commit

Permalink
Fixed config file check
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunagatteru committed Apr 23, 2023
1 parent f423aab commit adf8878
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/inn.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ func main() {
}
os.Mkdir(dataPath, 0755)
os.Mkdir(dataPath+"images/", 0755)
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
if _, err := os.Stat(dataPath + "config.yml"); os.IsNotExist(err) {
file, err := os.Create(dataPath + "config.yml")
if err != nil {
log.Fatalln("Unable to create file:", err)
}
defer file.Close()
}

config := options.GetCfg(dataPath)
server.Run(resources, variables, config)
}

0 comments on commit adf8878

Please sign in to comment.