diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-14 02:26:03 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-05-14 02:26:03 +0000 |
commit | 371ca6da989f1bafa836598ddf66bc72da1795fb (patch) | |
tree | 3cf0360ae7a23c07756914967bba89ac9790e3e0 /libs/ardour/session_state.cc | |
parent | 49f73b561b4117131e2d2da001d9dd133846ef62 (diff) |
use Glib::build_filename() more widely
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3347 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 770af1ba11..e419753159 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -2064,44 +2064,31 @@ Session::sound_dir (bool with_path) const string Session::peak_dir () const { - string res = _path; - res += peak_dir_name; - res += '/'; - return res; + return Glib::build_filename (_path, peak_dir_name); } string Session::automation_dir () const { - string res = _path; - res += "automation/"; - return res; + return Glib::build_filename (_path, "automation"); } string Session::analysis_dir () const { - string res = _path; - res += "analysis/"; - return res; + return Glib::build_filename (_path, "analysis"); } string Session::template_dir () { - string path = get_user_ardour_path(); - path += "templates/"; - - return path; + return Glib::build_filename (get_user_ardour_path(), "templates"); } string Session::export_dir () const { - string res = _path; - res += export_dir_name; - res += '/'; - return res; + return Glib::build_filename (_path, export_dir_name); } string @@ -2515,8 +2502,7 @@ Session::get_template_list (list<string> &template_names) int Session::read_favorite_dirs (FavoriteDirs & favs) { - string path = get_user_ardour_path(); - path += "/favorite_dirs"; + Glib::ustring path = Glib::build_filename (get_user_ardour_path(), "favorite_dirs"); ifstream fav (path.c_str()); @@ -2550,8 +2536,7 @@ Session::read_favorite_dirs (FavoriteDirs & favs) int Session::write_favorite_dirs (FavoriteDirs & favs) { - string path = get_user_ardour_path(); - path += "/favorite_dirs"; + Glib::ustring path = Glib::build_filename (get_user_ardour_path(), "favorite_dirs"); ofstream fav (path.c_str()); |