zorchenhimer / MoviePolls

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

Create db folder on startup if it doesnt exist #94

Closed CptPie closed 3 years ago

CptPie commented 3 years ago

It's getting kinda annoying to create the db folder for the json database by hand.

It should be easy to create the folder in the dataconnector init function.

CptPie commented 3 years ago

A bit more information: The json data backend expects/creates it's file at db/data.json. At the moment the file gets created if it doesn't exist, but creating that file fails, if the folder db does not exist already. A good place to put the folder creation would be before the file creation in the newJsonConnector function.

zorchenhimer commented 3 years ago

fixed with #96