diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2007-09-04 04:47:51 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2007-09-04 04:47:51 +0000 |
commit | 96034486b2621c3c39d11f0d25a7739afda85242 (patch) | |
tree | 5958917ec1706f7dda0272ac289e11af26ce87c4 /libs | |
parent | 3b937a7c44a1acd633c22970d67ed3b6af2f701e (diff) |
Use sys::path and SessionDirectory in Session::create_session_file_from_template for portability
git-svn-id: svn://localhost/ardour2/trunk@2370 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/session_state.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index ed1ae82f31..9074a0778c 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -439,9 +439,11 @@ Session::create_session_file () bool Session::create_session_file_from_template (const string& template_path) { - string out_path = _path + _name + statefile_suffix; + sys::path session_file_path(_session_dir->root_path()); - if(!copy_file (template_path, out_path)) { + session_file_path /= _name + statefile_suffix; + + if(!copy_file (template_path, session_file_path.to_string())) { error << string_compose (_("Could not use session template %1 to create new session."), template_path) << endmsg; return false; |