chocolatey / ChocolateyGUI

A delicious GUI for Chocolatey
https://docs.chocolatey.org/en-us/chocolatey-gui/
Apache License 2.0
1.65k stars 251 forks source link

(#996) Create config directory if it doesn't exist #1045

Closed corbob closed 5 months ago

corbob commented 5 months ago

Description Of Changes

Create the C:\ProgramData\Chocolatey GUI\Config\ directory if it doesn't already exist.

Motivation and Context

LiteDatabase doesn't handle creating the directory if it's not there. And cannot create it's file if the parent directory doesn't exist.

Testing

  1. Delete C:\ProgramData\Chocolatey Gui\ directory.
  2. Launch Chocolatey GUI.
  3. Ensure it doesn't error.
  4. Delete C:\ProgramData\Chocolatey Gui\ directory.
  5. Run chocolateyguicli -?.
  6. Ensure Help is output by Chocolatey GUI CLI.

Operating Systems Testing

Change Types Made

Change Checklist

Related Issue

Fixes #996

gep13 commented 5 months ago

@corbob thank you for getting this fixed up!