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
This commit is contained in:
parent
4522ef26a2
commit
4b96a5b34d
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user