nils-werner / crestic

Configurable Restic Wrapper
https://nils-werner.github.io/crestic/
MIT License
106 stars 10 forks source link

appdirs overwrites default paths #27

Closed uetchy closed 1 year ago

uetchy commented 2 years ago
Screen Shot 2022-01-19 at 15 16 49

I prefer having crestic config at /etc/crestic.cfg or /etc/crestic/crestic.cfg, but here:

https://github.com/nils-werner/crestic/blob/051adf577db8ad20f00af9a42076ab568a521759/crestic.py#L15-L29

appdirs part overwrites the existing paths variable.

Can I suggest prepending the paths found from appdirs module to the existing paths?

Env: Arch Linux - restic 0.12.1 compiled with go1.17.3 on linux/amd64 installed via yay -S crestic

nils-werner commented 2 years ago

Sounds reasonable. Do you want to open a PR?

uetchy commented 2 years ago

Very much. I’ll send a patch later.

On Mar 10, 2022, at 17:51, Nils Werner @.***> wrote:

 Sounds reasonable. Do you want to open a PR?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

nils-werner commented 2 years ago

Working with the config files logic myself I have realized that it works a lot differently from what I thought. Instead of reading just one file, ConfigFile.read() apparently reads all files and merges their content (which would neatly implement the features requested #19). I did not know that and designed everything incorrectly.

Because of this I will have to think about the config file logic a little bit more.

Also I am considering dropping appdirs as it is barely maintained and just makes things a lot more complicated.

nils-werner commented 1 year ago

It's gone now in the master branch