Fix path to user-clip library

This is only used when the path is initially unset (`@default@`),
existing config paths are left as-is.
This commit is contained in:
Robin Gareus 2022-03-28 18:34:17 +02:00
parent 66c71512c7
commit 3f37d54d85
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -50,6 +50,7 @@ ARDOUR::clip_library_dir (bool create_if_missing)
if (p == X_("@default@")) {
const char* c = 0;
if ((c = getenv ("XDG_DATA_HOME")) != 0) {
/* default: $HOME/.local/share */
p = c;
p = Glib::build_filename (p, "sounds", "clips");
} else {
@ -66,7 +67,7 @@ ARDOUR::clip_library_dir (bool create_if_missing)
p = Glib::build_filename (Glib::get_user_data_dir (), "Clip Library");
#else
/* Linux, *BSD: use XDG_DATA_HOME prefix, version-independent app folder */
p = Glib::build_filename (Glib::get_user_data_dir (), ".local", "share", "sounds", "clips");
p = Glib::build_filename (Glib::get_user_data_dir (), "sounds", "clips");
#endif
}