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; } }