don't include session-search paths with templates
authorRobin Gareus <robin@gareus.org>
Thu, 29 Sep 2016 22:11:24 +0000 (00:11 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 29 Sep 2016 22:11:24 +0000 (00:11 +0200)
libs/ardour/session_state.cc

index d27d9636461ed3afd996e8b0205f85e9041330e3..0d385bf56ac9a1c4533d568f4f47decb2b13484f 100644 (file)
@@ -1136,7 +1136,14 @@ Session::state (bool full_state)
                node->add_child_nocopy (*midi_port_stuff);
        }
 
-       node->add_child_nocopy (config.get_variables ());
+       XMLNode& cfgxml (config.get_variables ());
+       if (!full_state) {
+               /* exclude search-paths from template */
+               cfgxml.remove_nodes_and_delete ("name", "audio-search-path");
+               cfgxml.remove_nodes_and_delete ("name", "midi-search-path");
+               cfgxml.remove_nodes_and_delete ("name", "raid-path");
+       }
+       node->add_child_nocopy (cfgxml);
 
        node->add_child_nocopy (ARDOUR::SessionMetadata::Metadata()->get_state());