- PBD::error << "Zero plugins in VST." << endmsg; // XXX here? rather make this impossible before if it ain't already.
- }
-}
-
-
-/* *** CACHE AND BLACKLIST MANAGEMENT *** */
-
-/* return true if plugin is blacklisted or has an invalid file extension */
-static bool
-vstfx_blacklist_stat (const char *dllpath, int personal)
-{
- if (strstr (dllpath, ".so" ) == 0 && strstr(dllpath, ".dll") == 0) {
- return true;
- }
- string const path = vstfx_blacklist_path (dllpath, personal);
-
- if (Glib::file_test (path, Glib::FileTest (Glib::FILE_TEST_EXISTS | Glib::FILE_TEST_IS_REGULAR))) {
- struct stat dllstat;
- struct stat fsbstat;
-
- if (stat (dllpath, &dllstat) == 0 && stat (path.c_str(), &fsbstat) == 0) {
- if (dllstat.st_mtime > fsbstat.st_mtime) {
- /* plugin is newer than blacklist file */
- return true;
- }
- }
- /* stat failed or plugin is older than blacklist file */
- return true;
- }
- /* blacklist file does not exist */
- return false;
-}
-
-/* return true if plugin is blacklisted, checks both personal
- * and global folder */
-static bool
-vstfx_check_blacklist (const char *dllpath)
-{
- if (vstfx_blacklist_stat(dllpath, 0)) return true;
- if (vstfx_blacklist_stat(dllpath, 1)) return true;
- return false;
-}
-
-/* create blacklist file, preferably in same folder as the
- * plugin, fall back to personal folder in $HOME
- */
-static FILE *
-vstfx_blacklist_file (const char *dllpath)
-{
- FILE *f;
- if ((f = fopen (vstfx_blacklist_path (dllpath, 0).c_str(), "w"))) {
- return f;