From 4b96a5b34de67b99cb89e34466a63bcac97fef42 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 23 Jun 2012 05:09:44 +0000 Subject: [PATCH] Use std::string and Glib instead of pbd/filesystem.h in DeviceProfile git-svn-id: svn://localhost/ardour2/branches/3.0@12902 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/surfaces/mackie/device_profile.cc | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/libs/surfaces/mackie/device_profile.cc b/libs/surfaces/mackie/device_profile.cc index fbf7d89361..ea57458e1c 100644 --- a/libs/surfaces/mackie/device_profile.cc +++ b/libs/surfaces/mackie/device_profile.cc @@ -26,7 +26,6 @@ #include "pbd/error.h" #include "pbd/pathscanner.h" #include "pbd/replace_all.h" -#include "pbd/filesystem.h" #include "ardour/filesystem_paths.h" @@ -72,13 +71,10 @@ devprofile_search_path () return spath; } -static sys::path +static std::string user_devprofile_directory () { - sys::path p(user_config_directory()); - p /= devprofile_dir_name; - - return p; + return Glib::build_filename (user_config_directory(), devprofile_dir_name); } static bool @@ -340,20 +336,20 @@ legalize_for_path (const string& str) void DeviceProfile::save () { - sys::path fullpath = user_devprofile_directory(); + std::string fullpath = user_devprofile_directory(); - if (g_mkdir_with_parents (fullpath.to_string().c_str(), 0755) < 0) { - error << string_compose(_("Session: cannot create user MCP profile folder \"%1\" (%2)"), fullpath.to_string(), strerror (errno)) << endmsg; + if (g_mkdir_with_parents (fullpath.c_str(), 0755) < 0) { + error << string_compose(_("Session: cannot create user MCP profile folder \"%1\" (%2)"), fullpath, strerror (errno)) << endmsg; return; } - fullpath /= legalize_for_path (_name) + ".profile"; + fullpath = Glib::build_filename (fullpath, legalize_for_path (_name) + ".profile"); XMLTree tree; tree.set_root (&get_state()); - if (!tree.write (fullpath.to_string())) { - error << string_compose ("MCP profile not saved to %1", fullpath.to_string()) << endmsg; + if (!tree.write (fullpath)) { + error << string_compose ("MCP profile not saved to %1", fullpath) << endmsg; } }