diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:08:51 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:08:51 +0000 |
commit | 1844c8b42232c736fc83bda0c508074a13529fc1 (patch) | |
tree | 9d9027bd589b2b2bef8a6b02e8b31836b58783a1 /libs/ardour/session_directory.cc | |
parent | 7a6e86c9f9bef8db74b755db659794c4a859f36d (diff) |
Remove use of pbd/filesystem.h in SessionDirectory, use Glib equivalents
git-svn-id: svn://localhost/ardour2/branches/3.0@12878 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_directory.cc')
-rw-r--r-- | libs/ardour/session_directory.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/ardour/session_directory.cc b/libs/ardour/session_directory.cc index 6eacc8a814..f0d928ff0e 100644 --- a/libs/ardour/session_directory.cc +++ b/libs/ardour/session_directory.cc @@ -22,7 +22,6 @@ #include "pbd/error.h" #include "pbd/compose.h" #include "pbd/file_utils.h" -#include "pbd/filesystem.h" #include "ardour/directory_names.h" #include "ardour/session_directory.h" @@ -94,17 +93,17 @@ SessionDirectory::old_sound_path () const const std::string SessionDirectory::sources_root () const { - // fix this later - path p = m_root_path; + std::string p = m_root_path; + std::string filename = Glib::path_get_basename(p); - if (p.leaf() == ".") { + if (filename == ".") { p = PBD::get_absolute_path (m_root_path); } - const string legalized_root (legalize_for_path (p.leaf ())); + const string legalized_root (legalize_for_path (Glib::path_get_basename(p))); - path sources_root_path = m_root_path / interchange_dir_name / legalized_root; - return sources_root_path.to_string (); + std::string sources_root_path = Glib::build_filename (m_root_path, interchange_dir_name); + return Glib::build_filename (sources_root_path, legalized_root); } const std::string |