zorchenhimer / MoviePolls

Voting to decide on a movie to watch with MovieNight
https://discord.gg/F2VSgjJ
16 stars 6 forks source link

fixed issue #94: create db folder for startup #95

Closed Hamzsd closed 3 years ago

Hamzsd commented 3 years ago

Added code for creating folder and file if not already exists.

zorchenhimer commented 3 years ago

As @CptPie mentioned, you should not be creating an empty JSON file. It will be created on the first run.

Also, I'd prefer if this function was used unless there's a good reason not to: https://github.com/zorchenhimer/MoviePolls/blob/master/common/util.go#L16

CptPie commented 3 years ago

Since #96 did work on the same issue and got merged into master AND there was no response from the auther i'll close this now.