Use path::leaf instead of sys::basename in SessionDirectory::sound/midi_path
authorTim Mayberry <mojofunk@gmail.com>
Tue, 4 Sep 2007 09:01:22 +0000 (09:01 +0000)
committerTim Mayberry <mojofunk@gmail.com>
Tue, 4 Sep 2007 09:01:22 +0000 (09:01 +0000)
sys::basename now matches boost::filesystem behaviour so if a session name
had a dot in it the session name used in the interchange directory would be
truncated.

git-svn-id: svn://localhost/ardour2/trunk@2408 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/session_directory.cc

index ee5af0adf4070e041fb5aa4fbc077a541ed5a8a5..9d94b2228ec296ac88a397e0317152dd7b69cac3 100644 (file)
@@ -99,7 +99,7 @@ SessionDirectory::sound_path () const
        path l_sound_path(m_root_path);
 
        l_sound_path /= interchange_dir_name;
-       l_sound_path /= basename(m_root_path);
+       l_sound_path /= m_root_path.leaf();
        l_sound_path /= sound_dir_name;
 
        return l_sound_path;
@@ -112,7 +112,7 @@ SessionDirectory::midi_path () const
        path l_midi_path(m_root_path);
 
        l_midi_path /= interchange_dir_name;
-       l_midi_path /= basename(m_root_path);
+       l_midi_path /= m_root_path.leaf();
        l_midi_path /= midi_dir_name;
 
        return l_midi_path;