From 75f9a7cf1133e48c081e4ebd3d2a203eba7b665c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 30 Sep 2016 00:11:24 +0200 Subject: don't include session-search paths with templates --- libs/ardour/session_state.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libs/ardour/session_state.cc') diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index d27d963646..0d385bf56a 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -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()); -- cgit v1.2.3