diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2007-06-17 00:46:05 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2007-06-17 00:46:05 +0000 |
commit | 3ee59d437f3e608da46c7ca77accc268591b91c6 (patch) | |
tree | aba65eb9788cf7da6d19c3c5317496ac6504b177 /libs | |
parent | ee29fcacfb750e8880ccafc88fff360e2331950e (diff) |
Remove Session::midi_dir...again.
git-svn-id: svn://localhost/ardour2/trunk@1998 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/session.h | 1 | ||||
-rw-r--r-- | libs/ardour/session.cc | 8 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 27 |
3 files changed, 6 insertions, 30 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 94c0af07eb..52f9d8e99b 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -259,7 +259,6 @@ class Session : public PBD::StatefulDestructible sigc::signal<void> DirtyChanged; std::string sound_dir (bool with_path = true) const; - std::string midi_dir (bool with_path = true) const; std::string peak_dir () const; std::string automation_dir () const; diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index ed2aaff4b5..fd1b7b14b9 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3134,9 +3134,13 @@ Session::midi_path_from_name (string name) for (i = session_dirs.begin(); i != session_dirs.end(); ++i) { - spath = (*i).path; + SessionDirectory sdir((*i).path); + + sys::path p = sdir.midi_path(); + + p /= legalized; - spath += midi_dir(false) + "/" + legalized; + spath = p.to_string(); snprintf (buf, sizeof(buf), "%s-%u.mid", spath.c_str(), cnt); diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 24a335a128..2d4c5208cf 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1918,33 +1918,6 @@ Session::sound_dir (bool with_path) const } string -Session::midi_dir (bool with_path) const -{ - string res; - string full; - - if (with_path) { - res = _path; - } else { - full = _path; - } - - res += interchange_dir_name; - res += '/'; - res += legalize_for_path (_name); - res += '/'; - res += midi_dir_name; - - if (with_path) { - full = res; - } else { - full += res; - } - - return res; -} - -string Session::peak_dir () const { string res = _path; |