finally get to the bottom of where NO_PLUGIN_STATE needs to be in order to be useful
[ardour.git] / libs / ardour / export_formats_search_path.cc
index fa93e0a55a3b216985bb32349b7bba6134f1721b..cf18b14a1865bff1fa2f22d71828a51e726344e4 100644 (file)
@@ -17,6 +17,7 @@
 
 */
 
+#include <iostream>
 #include <glibmm/miscutils.h>
 
 #include "ardour/export_formats_search_path.h"
@@ -34,12 +35,16 @@ namespace ARDOUR {
 SearchPath
 export_formats_search_path ()
 {
-       bool export_path_defined = false;
-       SearchPath spath (Glib::getenv (export_env_variable_name, export_path_defined));
-
-       spath += user_config_directory ();
+       SearchPath spath (ardour_data_search_path());
        spath.add_subdirectory_to_paths (export_formats_dir_name);
 
+       bool export_formats_path_defined = false;
+       SearchPath spath_env (Glib::getenv(export_env_variable_name, export_formats_path_defined));
+
+       if (export_formats_path_defined) {
+               spath += spath_env;
+       }
+
        return spath;
 }