summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-28 01:45:15 +0000
committerDavid Robillard <d@drobilla.net>2012-01-28 01:45:15 +0000
commit2858d439020af4d3084d64d36776d77655eb293b (patch)
treea997682b285e8ec358fc6551bac830ee196d4f90 /libs/ardour/session_state.cc
parent66cd3d365cd798045364493426aab11ca7421b01 (diff)
Use new Lilv state API to save LV2 plugin state.
This saves a complete history of plugin state, i.e. save is no longer destructive. However, data is shared as much as possible, and new state is only written if the plugin state has actually changed. There is exactly one link in the entire session directory to any external file, so archiving will work with minimal copying. Not sure sure about the naming of the "externals" directory, but I have nothing better... git-svn-id: svn://localhost/ardour2/branches/3.0@11372 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 4cf14cdaf9..30590e3665 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -503,6 +503,13 @@ Session::ensure_subdirs ()
return -1;
}
+ dir = externals_dir ();
+
+ if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) {
+ error << string_compose(_("Session: cannot create session externals folder \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
+ return -1;
+ }
+
return 0;
}
@@ -2258,6 +2265,12 @@ Session::plugins_dir () const
return Glib::build_filename (_path, "plugins");
}
+string
+Session::externals_dir () const
+{
+ return Glib::build_filename (_path, "externals");
+}
+
int
Session::load_bundles (XMLNode const & node)
{