summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state_utils.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2012-06-23 05:07:02 +0000
committerTim Mayberry <mojofunk@gmail.com>2012-06-23 05:07:02 +0000
commit0f482627a59f37ab9aa24a9ac757e69039467988 (patch)
treee121b3851075d7d2d888feb7792305e232e1a109 /libs/ardour/session_state_utils.cc
parent7e7d053f53585bc9a38a646fbdd16db363bf78e9 (diff)
Replace use of PBD::sys::path in ardour/session_state_utils.h
git-svn-id: svn://localhost/ardour2/branches/3.0@12832 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state_utils.cc')
-rw-r--r--libs/ardour/session_state_utils.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/ardour/session_state_utils.cc b/libs/ardour/session_state_utils.cc
index 8cfda28780..be71289a17 100644
--- a/libs/ardour/session_state_utils.cc
+++ b/libs/ardour/session_state_utils.cc
@@ -18,9 +18,12 @@
#include <algorithm>
+#include <glibmm/fileutils.h>
+
#include "pbd/compose.h"
#include "pbd/error.h"
#include "pbd/file_utils.h"
+#include "pbd/filesystem.h"
#include "ardour/session_state_utils.h"
#include "ardour/filename_extensions.h"
@@ -33,11 +36,11 @@ using namespace PBD;
namespace ARDOUR {
bool
-create_backup_file (const sys::path & file_path)
+create_backup_file (const std::string & file_path)
{
- if (!sys::exists (file_path)) return false;
+ if (!Glib::file_test (file_path, Glib::FILE_TEST_EXISTS)) return false;
- sys::path backup_path(file_path.to_string() + backup_suffix);
+ std::string backup_path(file_path + backup_suffix);
try
{
@@ -46,7 +49,7 @@ create_backup_file (const sys::path & file_path)
catch(sys::filesystem_error& ex)
{
error << string_compose (_("Unable to create a backup copy of file %1 (%2)"),
- file_path.to_string(), ex.what())
+ file_path, ex.what())
<< endmsg;
return false;
}