forward port 2.X changes up to and including rev 6909
[ardour.git] / libs / ardour / import.cc
index 156186dbe4251a57dfcbdb05832e529978fbbc67..c3352a61272b18a8c02bb365bede5cf903e36c64 100644 (file)
@@ -174,8 +174,8 @@ get_paths_for_new_sources (HeaderFormat hf, const bool allow_replacing, const st
                std::string filepath = (type == DataType::MIDI)
                                ? sdir.midi_path().to_string() : sdir.sound_path().to_string();
 
-               filepath += '/';
-               filepath += get_non_existent_filename (hf, type, allow_replacing, filepath, basename, n, channels);
+                filepath = Glib::build_filename (filepath, 
+                                                 get_non_existent_filename (hf, type, allow_replacing, filepath, basename, n, channels));
                new_paths.push_back (filepath);
        }