Use PBD::sys::copy_file instead of PBD::copy_file in Session::create_session_file_from_template

git-svn-id: svn://localhost/ardour2/trunk@2377 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Tim Mayberry
2007-09-04 04:48:18 +00:00
parent e3364b72cc
commit 96c9b5456f

View File

@@ -443,8 +443,14 @@ Session::create_session_file_from_template (const string& template_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)
try
{
sys::copy_file (template_path, session_file_path);
}
catch(sys::filesystem_error& ex)
{
error << string_compose (_("Could not use session template %1 to create new session (%2)."),
template_path, ex.what())
<< endmsg;
return false;
}