From ac16da8ea69482c104ab32bfddb35ab319572216 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 13 Jul 2013 17:33:30 -0400 Subject: [PATCH] Fix saving sessions on windows by using g_rename instead of ::rename --- libs/ardour/session_state.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 7ccaca1a27..de573e61b6 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -807,9 +807,9 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot } else { - if (::rename (tmp_path.c_str(), xml_path.c_str()) != 0) { - error << string_compose (_("could not rename temporary session file %1 to %2"), - tmp_path, xml_path) << endmsg; + if (::g_rename (tmp_path.c_str(), xml_path.c_str()) != 0) { + error << string_compose (_("could not rename temporary session file %1 to %2 (%3)"), + tmp_path, xml_path, g_strerror(errno)) << endmsg; if (g_remove (tmp_path.c_str()) != 0) { error << string_compose(_("Could not remove temporary session file at path \"%1\" (%2)"), tmp_path, g_strerror (errno)) << endmsg; -- 2.30.2