Allow to query cache-dir by major version
Luckily "cachename" parameter was unused, so this API can be changed.
This commit is contained in:
parent
73991c4190
commit
7f453cab9e
|
@ -45,7 +45,7 @@ namespace ARDOUR {
|
||||||
* caches (e.g. plugin indices, blacklist/whitelist)
|
* caches (e.g. plugin indices, blacklist/whitelist)
|
||||||
* it defaults to XDG_CACHE_HOME
|
* 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
|
* @return the path used to store a persistent indication
|
||||||
|
|
|
@ -129,7 +129,7 @@ user_config_directory (int version)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
user_cache_directory (std::string cachename)
|
user_cache_directory (int version)
|
||||||
{
|
{
|
||||||
std::string p;
|
std::string p;
|
||||||
|
|
||||||
|
@ -164,11 +164,7 @@ user_cache_directory (std::string cachename)
|
||||||
}
|
}
|
||||||
#endif // end not __APPLE__
|
#endif // end not __APPLE__
|
||||||
|
|
||||||
if (cachename.empty ()) {
|
p = Glib::build_filename (p, user_config_directory_name (version));
|
||||||
p = Glib::build_filename (p, user_config_directory_name ());
|
|
||||||
} else {
|
|
||||||
p = Glib::build_filename (p, cachename);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
/* On Windows Glib::get_user_data_dir is the folder to use for local
|
/* On Windows Glib::get_user_data_dir is the folder to use for local
|
||||||
|
|
Loading…
Reference in New Issue