replace ~ in mpd_music_dir with user's home directory

master
Andrzej Rybczak 17 years ago
parent 966fd634a4
commit 6e2a6dfd27
  1. 5
      src/settings.cpp

@ -517,7 +517,12 @@ void ReadConfiguration(ncmpcpp_config &conf)
else if (cl.find("mpd_music_dir") != string::npos)
{
if (!v.empty())
{
// if ~ is used at the beginning, replace it with user's home folder
if (v[0] == '~')
v.replace(0, 1, home_folder);
conf.mpd_music_dir = v + "/";
}
}
else if (cl.find("mpd_port") != string::npos)
{

Loading…
Cancel
Save