summaryrefslogtreecommitdiff
path: root/libs/ardour/vst_info_file.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-02-24 21:11:22 +0100
committerRobin Gareus <robin@gareus.org>2014-02-24 23:57:28 +0100
commitadcb0faf6ba025d0ed8d79676d9a91ae1e00a9fd (patch)
tree149a1687037c1b210f209108d5d2b955c5f60fd1 /libs/ardour/vst_info_file.cc
parent6ee44cf3777c5c7fe781e0196ef3a71f96b65de5 (diff)
preparations for VST blacklist (paths)
Diffstat (limited to 'libs/ardour/vst_info_file.cc')
-rw-r--r--libs/ardour/vst_info_file.cc38
1 files changed, 28 insertions, 10 deletions
diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc
index 67117b2a6a..a0dffd0165 100644
--- a/libs/ardour/vst_info_file.cc
+++ b/libs/ardour/vst_info_file.cc
@@ -42,6 +42,7 @@
#include "pbd/error.h"
+#include "ardour/filesystem_paths.h"
#include "ardour/linux_vst_support.h"
#include "ardour/vst_info_file.h"
@@ -254,16 +255,7 @@ vstfx_infofile_path (const char* dllpath, int personal)
{
string dir;
if (personal) {
- // TODO use XDG_CACHE_HOME
- dir = Glib::build_filename (Glib::get_home_dir (), ".fst");
-
- /* If the directory doesn't exist, try to create it */
- if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR)) {
- if (g_mkdir (dir.c_str (), 0700)) {
- return 0;
- }
- }
-
+ dir = get_personal_vst_info_cache_dir();
} else {
dir = Glib::path_get_dirname (std::string(dllpath));
}
@@ -685,6 +677,32 @@ vstfx_free_info_list (vector<VSTInfo *> *infos)
delete infos;
}
+string
+get_personal_vst_blacklist_dir() {
+ string dir = Glib::build_filename (ARDOUR::user_cache_directory(), "fst_blacklist");
+ /* if the directory doesn't exist, try to create it */
+ if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR)) {
+ if (g_mkdir (dir.c_str (), 0700)) {
+ PBD::error << "Cannt create VST cache folder '" << dir << "'" << endmsg;
+ //exit(1);
+ }
+ }
+ return dir;
+}
+
+string
+get_personal_vst_info_cache_dir() {
+ string dir = Glib::build_filename (ARDOUR::user_cache_directory(), "fst_info");
+ /* if the directory doesn't exist, try to create it */
+ if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR)) {
+ if (g_mkdir (dir.c_str (), 0700)) {
+ PBD::error << "Cannt create VST info folder '" << dir << "'" << endmsg;
+ //exit(1);
+ }
+ }
+ return dir;
+}
+
#ifdef LXVST_SUPPORT
vector<VSTInfo *> *
vstfx_get_info_lx (char* dllpath)