crestic icon indicating copy to clipboard operation
crestic copied to clipboard

appdirs overwrites default paths

Open uetchy opened this issue 3 years ago • 3 comments

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

uetchy avatar Mar 10 '22 04:03 uetchy

Sounds reasonable. Do you want to open a PR?

nils-werner avatar Mar 10 '22 08:03 nils-werner

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.

uetchy avatar Mar 10 '22 09:03 uetchy

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 avatar Apr 02 '22 14:04 nils-werner

It's gone now in the master branch

nils-werner avatar Oct 09 '22 19:10 nils-werner