wichtounet / budgetwarrior

Personal finance manager, command-line interface, in C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to load the configuration (/.local/share/budget)

tylerdq opened this issue · comments

I'm really interested in exploring this software but I'm getting the below error on Manjaro 23.0.4

The folder "/.local/share/budget" does not exist. Would like to create it [yes/no] ? yes
[main thread ] budget.cpp:198 ERR| Unable to load the configuration

I get the same result for "yes", and yes/no also give the same results whether I install from the AUR or compile from source.

I noticed from the documentation that the program should be looking for .budget under my home folder. Is there something either in the code or what I'm doing that would cause it to be looking for the wrong folder?

I created a PR with a possible resolution.

Hi Tyler,

Sorry about this issue.

The documentation is wrong there and the code is right :) I have updated the doc.
I have also improved slightly the code to create the directory to give you a nice error and create directories recursively, it make help in your case. Can you try the version from master again?

There is one easy workaround for this case. You can create the directory manually. Either mkdir ~/.budget or mkdir ~/.local/share/budget. Any of these two directories, if they exist, will be picked by the tool.

Let me know how that goes for you.

I discarded my local changes to config.cpp, pulled and rebuilt from the new master source, and it started up just fine. Since I already had ~/.budget at this point this wasn't a test of the new error and recursive directory creation code, but I can confirm it's picking my existing local directory just fine.

Thank you!

Awesome!