ncmpcpp / ncmpcpp

Featureful ncurses based MPD client inspired by ncmpc
GNU General Public License v2.0
2.11k stars 225 forks source link

ncmpcpp fails if $XDG_CONFIG_HOME/ncmpcpp/config and ~/.ncmpcpp/config are available #107

Open matthiasbeyer opened 8 years ago

matthiasbeyer commented 8 years ago

I had ~/.ncmpcpp linked to ~/config/ncmpcpp/ and ~/.config (which is $XDG_CONFIG_HOME per default) linked to ~/config.

This results in ncmpcpp crashing since version 0.7:

$ ncmpcpp
Reading configuration from /home/m/.ncmpcpp/config...
WARNING: default_space_mode is deprecated and will be removed in 0.8.
Reading configuration from /home/m/.config/ncmpcpp/config...
Error while processing option "mpd_port": option already defined

A simple solution would be to override options by the latter file loaded (and maybe print a warning that cfg-file 1 overrides cfg-file 2), AFAICS.

arybczak commented 8 years ago

You can run ncmpcpp with --ignore-config-errors to well, ignore these errors ;)

MarcinWieczorek commented 7 years ago

@arybczak I've looked into the code and it's looks like it's supposed to be like that. It doesn't override settings, it just throws an exception. --ignore-config-errors indeed ignores that error. I'd love to contribute a little to the project, just tell what should it act like.