13
0

Allow to query cache-dir by major version

Luckily "cachename" parameter was unused, so this API
can be changed.
This commit is contained in:
Robin Gareus 2023-09-27 01:04:47 +02:00
parent 73991c4190
commit 7f453cab9e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 3 additions and 7 deletions

View File

@ -45,7 +45,7 @@ namespace ARDOUR {
* caches (e.g. plugin indices, blacklist/whitelist)
* it defaults to XDG_CACHE_HOME
*/
LIBARDOUR_API std::string user_cache_directory (std::string cachename = "");
LIBARDOUR_API std::string user_cache_directory (int version = -1);
/**
* @return the path used to store a persistent indication

View File

@ -129,7 +129,7 @@ user_config_directory (int version)
}
std::string
user_cache_directory (std::string cachename)
user_cache_directory (int version)
{
std::string p;
@ -164,11 +164,7 @@ user_cache_directory (std::string cachename)
}
#endif // end not __APPLE__
if (cachename.empty ()) {
p = Glib::build_filename (p, user_config_directory_name ());
} else {
p = Glib::build_filename (p, cachename);
}
p = Glib::build_filename (p, user_config_directory_name (version));
#ifdef PLATFORM_WINDOWS
/* On Windows Glib::get_user_data_dir is the folder to use for local