Fix the priority of config locations and XDG_CONFIG_HOME location

This commit is contained in:
Ryze 2023-02-08 20:25:43 +03:00
parent ac36fe351d
commit 9faef04412

View file

@ -73,12 +73,12 @@ impl Config {
return home;
}
if let Ok(home) = env::var("HOME") {
return home + "/.config/mpv/";
if let Ok(home) = env::var("XDG_CONFIG_HOME") {
return home + "/mpv/";
}
if let Ok(home) = env::var("XDG_CONFIG_HOME") {
return home + "/.mpv/";
if let Ok(home) = env::var("HOME") {
return home + "/.config/mpv/";
}
"/etc/mpv/".to_owned()