Replace use of PBD::sys::path in AudioRegionImporter
authorTim Mayberry <mojofunk@gmail.com>
Sat, 23 Jun 2012 05:06:57 +0000 (05:06 +0000)
committerTim Mayberry <mojofunk@gmail.com>
Sat, 23 Jun 2012 05:06:57 +0000 (05:06 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12830 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ardour/audio_region_importer.h
libs/ardour/audio_region_importer.cc

index 5aee017c51b23d04644dabed281fdcfb8e6b072e..b3bcb05668e3ea2fcad3b7c2632f9a70247a84fb 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "pbd/xml++.h"
 #include "pbd/id.h"
-#include "pbd/filesystem.h"
 #include "ardour/element_importer.h"
 #include "ardour/element_import_handler.h"
 #include "ardour/import_status.h"
@@ -100,7 +99,7 @@ class AudioRegionImporter : public ElementImporter
 
        bool parse_xml_region ();
        bool parse_source_xml ();
-       PBD::sys::path get_sound_dir (XMLTree const & tree);
+       std::string get_sound_dir (XMLTree const & tree);
 
        void prepare_region ();
        void prepare_sources ();
index d1a1da718ed351f5d916f5e44bc1eb86989a0284..53367a35a443282d752ee5b99546b06b27ae97a5 100644 (file)
@@ -234,8 +234,7 @@ AudioRegionImporter::parse_source_xml ()
 {
        uint32_t channels;
        char buf[128];
-       PBD::sys::path source_dir = get_sound_dir (source);
-       PBD::sys::path source_path;
+       std::string source_dir(get_sound_dir (source));
        XMLNode * source_node;
        XMLProperty *prop;
 
@@ -268,15 +267,12 @@ AudioRegionImporter::parse_source_xml ()
                for (XMLNodeList::const_iterator it = sources.begin(); it != sources.end(); ++it) {
                        prop = (*it)->property ("id");
                        if (prop && !source_id.compare (prop->value())) {
-                               source_path = source_dir;
                                prop = (*it)->property ("name");
                                if (!prop) {
                                        error << string_compose (X_("AudioRegionImporter (%1): source %2 has no \"name\" property"), name, source_id) << endmsg;
                                        return false;
                                }
-                               source_path /= prop->value();
-                               filenames.push_back (source_path.to_string());
-
+                               filenames.push_back (Glib::build_filename (source_dir, prop->value()));
                                source_found = true;
                                break;
                        }
@@ -291,7 +287,7 @@ AudioRegionImporter::parse_source_xml ()
        return true;
 }
 
-PBD::sys::path
+std::string
 AudioRegionImporter::get_sound_dir (XMLTree const & tree)
 {
        SessionDirectory session_dir(Glib::path_get_dirname (tree.filename()));