diff options
author | Doug McLain <doug@nostar.net> | 2007-02-15 16:44:22 +0000 |
---|---|---|
committer | Doug McLain <doug@nostar.net> | 2007-02-15 16:44:22 +0000 |
commit | 1cf6978cadcfc9a32b3ed52914d0fc80f3359e29 (patch) | |
tree | d0334baf4d9870dadfd64c8c56d369ac5648ef2d /libs/ardour/session_state.cc | |
parent | e72e12d4bab557bbbc9d9cfa2a574ad06c3e8170 (diff) |
This creates an export direcory for new sessions. The export dialog will also default to that directory
git-svn-id: svn://localhost/ardour2/trunk@1466 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 9c2e854486..b62f4f3896 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -487,6 +487,13 @@ Session::create (bool& new_session, string* mix_template, nframes_t initial_leng return -1; } + dir = export_dir (); + + if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) { + error << string_compose(_("Session: cannot create session export dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg; + return -1; + } + /* check new_session so we don't overwrite an existing one */ @@ -1908,6 +1915,15 @@ Session::template_dir () } string +Session::export_dir () const +{ + string res = _path; + res += export_dir_name; + res += '/'; + return res; +} + +string Session::suffixed_search_path (string suffix, bool data) { string path; |