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 53516be933331047017a6bd5425b7bc02adafa0e..cf18b14a1865bff1fa2f22d71828a51e726344e4 100644 (file)
@@ -17,6 +17,7 @@
 
 */
 
+#include <iostream>
 #include <glibmm/miscutils.h>
 
 #include "ardour/export_formats_search_path.h"
@@ -34,17 +35,15 @@ namespace ARDOUR {
 SearchPath
 export_formats_search_path ()
 {
-       bool export_path_defined = false;
-       SearchPath spath_env (Glib::getenv(export_env_variable_name, export_path_defined));
-
-       if (export_path_defined) {
-               return spath_env;
-       }
+       SearchPath spath (ardour_data_search_path());
+       spath.add_subdirectory_to_paths (export_formats_dir_name);
 
-       SearchPath spath (user_config_directory ());
+       bool export_formats_path_defined = false;
+       SearchPath spath_env (Glib::getenv(export_env_variable_name, export_formats_path_defined));
 
-       spath += ardour_module_directory ();
-       spath.add_subdirectory_to_paths (export_formats_dir_name);
+       if (export_formats_path_defined) {
+               spath += spath_env;
+       }
 
        return spath;
 }